mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 12:14:46 -04:00
24 lines
579 B
C#
24 lines
579 B
C#
using Microsoft.AspNetCore.Authorization;
|
|
|
|
namespace Kyoo.Authentication
|
|
{
|
|
/// <summary>
|
|
/// The requirement of Kyoo's authentication policies.
|
|
/// </summary>
|
|
public class AuthRequirement : IAuthorizationRequirement
|
|
{
|
|
/// <summary>
|
|
/// The name of the permission
|
|
/// </summary>
|
|
public string Permission { get; }
|
|
|
|
/// <summary>
|
|
/// Create a new <see cref="AuthRequirement"/> for the given permission.
|
|
/// </summary>
|
|
/// <param name="permission">The permission needed</param>
|
|
public AuthRequirement(string permission)
|
|
{
|
|
Permission = permission;
|
|
}
|
|
}
|
|
} |