Class RequireRoleFilter
- Namespace
- JD.AI.Gateway.Middleware
- Assembly
- JD.AI.Gateway.dll
Endpoint filter that enforces RequireRoleAttribute.
public sealed class RequireRoleFilter : IEndpointFilter
- Inheritance
-
RequireRoleFilter
- Implements
- Inherited Members
Constructors
RequireRoleFilter(GatewayRole)
Endpoint filter that enforces RequireRoleAttribute.
public RequireRoleFilter(GatewayRole minimumRole)
Parameters
minimumRoleGatewayRole
Methods
InvokeAsync(EndpointFilterInvocationContext, EndpointFilterDelegate)
Implements the core logic associated with the filter given a EndpointFilterInvocationContext and the next filter to call in the pipeline.
public ValueTask<object?> InvokeAsync(EndpointFilterInvocationContext context, EndpointFilterDelegate next)
Parameters
contextEndpointFilterInvocationContextThe EndpointFilterInvocationContext associated with the current request/response.
nextEndpointFilterDelegateThe next filter in the pipeline.