Class ValidateResourcesRightMiddleware
- Namespace
- Arc4u.OAuth2.Middleware
- Assembly
- Arc4u.OAuth2.AspNetCore.dll
A middleware that protects resource paths with authorization policies. When the current principal does not satisfy the policy of the requested path, the response is a status 200 with the configured content instead of the resource.
public class ValidateResourcesRightMiddleware
- Inheritance
-
ValidateResourcesRightMiddleware
- Inherited Members
Constructors
ValidateResourcesRightMiddleware(RequestDelegate, ValidateResourcesRightMiddlewareOptions)
Initializes a new instance of the ValidateResourcesRightMiddleware class.
public ValidateResourcesRightMiddleware(RequestDelegate next, ValidateResourcesRightMiddlewareOptions options)
Parameters
nextRequestDelegateThe next middleware of the pipeline.
optionsValidateResourcesRightMiddlewareOptionsThe protected resources.
Exceptions
- ArgumentNullException
An argument is null.
Methods
InvokeAsync(HttpContext)
Processes the request.
public Task InvokeAsync(HttpContext context)
Parameters
contextHttpContextThe HTTP context.
Returns
- Task
A task that completes when the response is written or the rest of the pipeline is done.