AuthorizationResponseHandlerOptions Class
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Authentication
- Assemblies
- 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
Examples
The following example demonstrates how to configure AuthorizationResponseHandlerOptions to customize the behavior of the authorization response handler.
using Cuemon.Diagnostics;
using Cuemon.Extensions.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization.Policy;
namespace MyApp.Examples;
public class AuthorizationResponseHandlerOptionsExample
{
public void Demonstrate()
{
var options = new AuthorizationResponseHandlerOptions
{
SensitivityDetails = FaultSensitivityDetails.All,
FallbackResponseHandler = new AuthorizationMiddlewareResultHandler()
};
}
}
Constructors
| Name | Description |
|---|---|
| AuthorizationResponseHandlerOptions() | Initializes a new instance of the AuthorizationResponseHandlerOptions class. |
Properties
| Name | Description |
|---|---|
| AuthorizationFailureHandler | Gets or sets the function delegate that provides the reason/requirement/generic message of the failed authorization. |
| FallbackResponseHandler | Gets or sets the mandatory IAuthorizationMiddlewareResultHandler implementation of a fallback response handler. |
| SensitivityDetails | Gets or sets a bitwise combination of the enumeration values that specify which sensitive details to include in the serialized result. |
Methods
| Name | Description |
|---|---|
| ValidateOptions() | Determines whether the public read-write properties of this instance are in a valid state. |