Namespace Arc4u.OAuth2.Middleware
Classes
- AddContextToPrincipalMiddleware
A middleware that enriches the request of an authenticated AppPrincipal: it ensures the request carries a
traceparentheader and sets the current culture of the principal profile from theculturerequest header.
- BasicAuthenticationMiddleware
A middleware that converts credentials into a bearer token. The credentials are read from a Basic
Authorizationheader or, when the CertificateHeaderOptions are configured, from an encrypted header or query string parameter. A token is requested for them from the token provider designated by theProviderIdof the settings, cached in the ITokenCache, and theAuthorizationheader of the request is replaced byBearer <token>. Errors are logged and the request continues without change.
- BasicAuthenticationMiddlewareExtension
Registers and configures the BasicAuthenticationMiddleware.
- ForceOpenIdMiddleWare
A middleware that challenges the OpenID Connect scheme for unauthenticated requests whose path matches one of the ForceAuthenticationForPaths. It is meant for the parts of a site used from a browser (Swagger, Hangfire, ...) where the user must be sent to the login page.
- ForceOpenIdMiddleWareOptions
Configures the ForceOpenIdMiddleWare.
- ForceOpenIdMiddleWareOptionsExtension
Registers and adds the ForceOpenIdMiddleWare.
- OpenIdBearerInjectorMiddleware
A middleware that gives a bearer token to requests authenticated with the OpenID Connect (cookie) authentication, so the token can be used by the code that reads the
Authorizationheader. The token is requested from the on-behalf-of provider when on-behalf-of settings exist, otherwise from the provider of the OpenID settings. The header is replaced byBearer <token>and the token is stored in the BootstrapContext. The culture of the principal profile is added to the request in thecultureheader.
- OpenIdBearerInjectorMiddlewareExtension
Registers and adds the OpenIdBearerInjectorMiddleware.
- ValidateResourcesRightMiddleware
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.
- ValidateSwaggerRightMiddleware
A middleware that protects the Swagger document path: when the current principal does not have the right Access, the response is a status 200 with ContentToDisplay instead of the document.
- ValidateSwaggerRightMiddlewareOption
Configures the ValidateSwaggerRightMiddleware.