Class DiscoveryResponseGenerator
- Namespace
- Fdyay.IdentityServer.ResponseHandling
- 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 DiscoveryResponseGenerator : IDiscoveryResponseGenerator
- Inheritance
-
DiscoveryResponseGenerator
- Implements
- Inherited Members
Constructors
DiscoveryResponseGenerator(IOptions<IdentityServerOptions>, IResourceStore, IKeyMaterialService, ISecretsListParser, IEnumerable<IExtensionGrantValidator>, ILogger<DiscoveryResponseGenerator>)
Creates the generator, as the container resolves it.
public DiscoveryResponseGenerator(IOptions<IdentityServerOptions> options, IResourceStore resourceStore, IKeyMaterialService keys, ISecretsListParser secretParser, IEnumerable<IExtensionGrantValidator> extensionGrants, ILogger<DiscoveryResponseGenerator> logger)
Parameters
optionsIOptions<IdentityServerOptions>The server options; their
Discoverysection decides what the document shows.resourceStoreIResourceStoreThe resources whose scopes and claims the document lists.
keysIKeyMaterialServiceThe validation keys the key set publishes.
secretParserISecretsListParserThe client authentication methods the document lists.
extensionGrantsIEnumerable<IExtensionGrantValidator>The extension grants whose grant types the document lists.
loggerILogger<DiscoveryResponseGenerator>Receives a custom entry that collides with a standard one.
Methods
CreateDiscoveryDocumentAsync(string, CancellationToken)
The discovery document for issuer, as member names and values (OpenID Connect Discovery 1.0 §3).
public Task<Dictionary<string, object>> CreateDiscoveryDocumentAsync(string issuer, CancellationToken cancellationToken = default)
Parameters
issuerstringThis server's issuer, which every endpoint URL in the document is built from.
cancellationTokenCancellationTokenCancels the build.
Returns
- Task<Dictionary<string, object>>
The document's members.
Exceptions
- ArgumentException
issueris null or empty.
CreateJwksAsync(CancellationToken)
The JSON Web Key Set (RFC 7517 §5): a keys array with the public part of each validation key.
public Task<object> CreateJwksAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenCancels the build.