3 instantiations of AuthorizationFailure
Microsoft.AspNetCore.Authorization (3)
AuthorizationFailure.cs (3)
15
private static readonly AuthorizationFailure _explicitFailure =
new
() { FailCalled = true };
45
=> new
AuthorizationFailure
57
=> new
AuthorizationFailure
{ FailedRequirements = failed };
15 references to AuthorizationFailure
Aspire.Dashboard (1)
Authentication\AspirePolicyEvaluator.cs (1)
103
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid(
AuthorizationFailure
)"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
Microsoft.AspNetCore.Authorization (10)
AuthorizationFailure.cs (4)
15
private static readonly
AuthorizationFailure
_explicitFailure = new() { FailCalled = true };
38
public static
AuthorizationFailure
ExplicitFail() => _explicitFailure;
44
public static
AuthorizationFailure
Failed(IEnumerable<AuthorizationFailureReason> reasons)
56
public static
AuthorizationFailure
Failed(IEnumerable<IAuthorizationRequirement> failed)
AuthorizationResult.cs (3)
16
private static readonly AuthorizationResult _failedResult = new() { Failure =
AuthorizationFailure
.ExplicitFail() };
29
public
AuthorizationFailure
? Failure { get; private set; }
42
public static AuthorizationResult Failed(
AuthorizationFailure
failure) => new AuthorizationResult { Failure = failure };
DefaultAuthorizationEvaluator.cs (2)
20
?
AuthorizationFailure
.Failed(context.FailureReasons)
21
:
AuthorizationFailure
.Failed(context.PendingRequirements));
LoggingExtensions.cs (1)
17
public static void UserAuthorizationFailed(this ILogger logger,
AuthorizationFailure
failure)
Microsoft.AspNetCore.Authorization.Policy (4)
IPolicyEvaluator.cs (1)
35
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid(
AuthorizationFailure
)"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise
PolicyAuthorizationResult.cs (2)
35
public
AuthorizationFailure
? AuthorizationFailure { get; private set; }
54
public static PolicyAuthorizationResult Forbid(
AuthorizationFailure
? authorizationFailure)
PolicyEvaluator.cs (1)
92
/// Otherwise returns <see cref="PolicyAuthorizationResult.Forbid(
AuthorizationFailure
)"/> if <see cref="AuthenticateResult.Succeeded"/>, otherwise