Class AuthenticationPipelineExtensions
- Namespace
- Microsoft.Extensions.DependencyInjection
- Assembly
- Excalibur.Dispatch.dll
Extension methods for adding authentication middleware to the dispatch pipeline.
public static class AuthenticationPipelineExtensions
- Inheritance
-
AuthenticationPipelineExtensions
- Inherited Members
Methods
UseAuthentication(IDispatchBuilder)
Adds authentication middleware to the dispatch pipeline.
public static IDispatchBuilder UseAuthentication(this IDispatchBuilder builder)
Parameters
builderIDispatchBuilderThe dispatch builder.
Returns
- IDispatchBuilder
The builder for fluent configuration.
Remarks
The authentication middleware establishes the identity of the caller by validating credentials attached to the message context before passing it to downstream handlers.
Authentication services must be registered separately in the DI container. This method only adds the middleware to the pipeline.
Recommended pipeline order:
builder.UseExceptionMapping()
.UseAuthentication() // Authenticate first
.UseAuthorization() // Then authorize
.UseValidation()
.UseRetry();