Class AuthenticationMiddleware
- Namespace
- Cratis.Arc.Http
- Assembly
- Cratis.Arc.Core.dll
Middleware for authenticating HTTP requests.
public class AuthenticationMiddleware
- Inheritance
-
AuthenticationMiddleware
- Inherited Members
- Extension Methods
Constructors
AuthenticationMiddleware(IAuthentication)
Middleware for authenticating HTTP requests.
public AuthenticationMiddleware(IAuthentication authentication)
Parameters
authenticationIAuthenticationThe authentication service.
Methods
Authenticate(IHttpRequestContext, EndpointMetadata?)
Handles authentication for the HTTP request.
public Task<bool> Authenticate(IHttpRequestContext context, EndpointMetadata? metadata)
Parameters
contextIHttpRequestContextThe HTTP request context.
metadataEndpointMetadataThe endpoint metadata.
Returns
Exceptions
- AuthenticationRequiredWithoutHandlers
Authentication is required but no handler is registered.