Class EndpointRouter
- Namespace
- Fdyay.IdentityServer.Hosting
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public sealed class EndpointRouter : IEndpointRouter
- Inheritance
-
EndpointRouter
- Implements
- Inherited Members
Constructors
EndpointRouter(IEnumerable<Endpoint>, IOptions<IdentityServerOptions>)
Creates the router over the registered endpoints.
public EndpointRouter(IEnumerable<Endpoint> endpoints, IOptions<IdentityServerOptions> options)
Parameters
endpointsIEnumerable<Endpoint>The protocol endpoints, matched in the order given.
optionsIOptions<IdentityServerOptions>The server options, read per request:
Endpointsswitches endpoints off andMutualTlsserves the mTLS aliases.
Methods
Find(HttpContext)
Finds the handler for a request, or null when no endpoint matches or the matching one is disabled.
public IEndpointHandler? Find(HttpContext context)
Parameters
contextHttpContext
Returns
Remarks
A disabled endpoint yields null so the request falls through the middleware to the rest of the pipeline, which is a 404 in a host that has nothing else mapped at that path.
The options are read per request rather than captured in the constructor. The router is a singleton and
the endpoints are registered by AddIdentityServer(), so reading them at construction would freeze
whatever was configured at that moment and ignore any Configure<IdentityServerOptions> the
host runs afterwards.