You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Security/Authorization/AuthorizationResult.cs

15 lines
492 B

namespace Connected.Security.Authorization
{
public sealed class AuthorizationResult : IAuthorizationResult
{
public bool Success { get; init; }
public AuthorizationResultReason Reason { get; init; }
public int PermissionCount { get; init; }
public static AuthorizationResult OK() => new() { Success = true, Reason = AuthorizationResultReason.OK };
public static AuthorizationResult Fail(AuthorizationResultReason reason) => new() { Success = false, Reason = reason };
}
}