Class OAuthMetadataEndpoint
- Namespace
- Fdyay.IdentityServer.Endpoints
- Assembly
- Fdyay.IdentityServer.AspNetCore.dll
Serves OAuth 2.0 authorization server metadata (RFC 8414): the discovery document, at OAuth's well-known path.
public sealed class OAuthMetadataEndpoint : IEndpointHandler
- Inheritance
-
OAuthMetadataEndpoint
- Implements
- Inherited Members
Remarks
Measured from Duende 8.0.1's OAuthMetadataEndpoint. RFC 8414 §3.1 puts an issuer's path after the well-known segment,
so the router hands this endpoint every path beneath its own, and it answers only when that path makes up the issuer
exactly: scheme, host and path, compared ordinally. Anything else is a 404 — including a request under a path base, where
the well-known path is not at the host's root, which is the only place RFC 8414 lets it be.
Constructors
OAuthMetadataEndpoint(IIssuerNameService, IIssuerPathValidator, IDiscoveryResponseGenerator, IOptions<IdentityServerOptions>)
Creates the endpoint from its services, as the container resolves it.
public OAuthMetadataEndpoint(IIssuerNameService issuerNameService, IIssuerPathValidator issuerPathValidator, IDiscoveryResponseGenerator generator, IOptions<IdentityServerOptions> options)
Parameters
issuerNameServiceIIssuerNameServiceNames this server as the issuer the document describes.
issuerPathValidatorIIssuerPathValidatorDecides whether the issuer path appended to the well-known path names this server.
generatorIDiscoveryResponseGeneratorBuilds the metadata document.
optionsIOptions<IdentityServerOptions>The server options; their
Discoverysection shapes the document and its caching.
Methods
ProcessAsync(HttpContext)
Processes the request, or returns null to pass the request through.
public Task<IEndpointResult?> ProcessAsync(HttpContext context)
Parameters
contextHttpContext