Class AuthorizationResponseHandlerOptions
- Assembly
- Cuemon.Extensions.AspNetCore.Authentication.dll
Specifies options that is related to AuthorizationResponseHandler operations.
public class AuthorizationResponseHandlerOptions : AsyncOptions, IAsyncOptions, IExceptionDescriptorOptions, IValidatableParameterObject, IParameterObject
- Inheritance
-
AuthorizationResponseHandlerOptions
- Implements
- Inherited Members
- Extension Methods
Constructors
AuthorizationResponseHandlerOptions()
Initializes a new instance of the AuthorizationResponseHandlerOptions class.
public AuthorizationResponseHandlerOptions()
Remarks
The following table shows the initial property values for an instance of AuthorizationResponseHandlerOptions.
Property | Initial Value |
---|---|
FallbackResponseHandler | new AuthorizationMiddlewareResultHandler() |
SensitivityDetails | None |
AuthorizationFailureHandler |
|
Properties
AuthorizationFailureHandler
Gets or sets the function delegate that provides the reason/requirement/generic message of the failed authorization.
public Func<AuthorizationFailure, HttpStatusCodeException> AuthorizationFailureHandler { get; set; }
Property Value
- Func<AuthorizationFailure, HttpStatusCodeException>
The function delegate that provides the reason/requirement/generic message of the failed authorization.
FallbackResponseHandler
Gets or sets the mandatory Microsoft.AspNetCore.Authorization.IAuthorizationMiddlewareResultHandler implementation of a fallback response handler.
public IAuthorizationMiddlewareResultHandler FallbackResponseHandler { get; set; }
Property Value
- IAuthorizationMiddlewareResultHandler
The mandatory Microsoft.AspNetCore.Authorization.IAuthorizationMiddlewareResultHandler implementation of a fallback response handler.
Remarks
If everything else fails; this is safeguard to keep the AuthN/AuthZ flow intact.
SensitivityDetails
Gets or sets a bitwise combination of the enumeration values that specify which sensitive details to include in the serialized result.
public FaultSensitivityDetails SensitivityDetails { get; set; }
Property Value
- FaultSensitivityDetails
The enumeration values that specify which sensitive details to include in the serialized result.
Methods
ValidateOptions()
Determines whether the public read-write properties of this instance are in a valid state.
public void ValidateOptions()
Remarks
This method is expected to throw exceptions when one or more conditions fails to be in a valid state.
Exceptions
- InvalidOperationException
FallbackResponseHandler cannot be null -or- AuthorizationFailureHandler cannot be null.