Table of Contents

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

options IOptions<IdentityServerOptions>

The server options; their Discovery section decides what the document shows.

resourceStore IResourceStore

The resources whose scopes and claims the document lists.

keys IKeyMaterialService

The validation keys the key set publishes.

secretParser ISecretsListParser

The client authentication methods the document lists.

extensionGrants IEnumerable<IExtensionGrantValidator>

The extension grants whose grant types the document lists.

logger ILogger<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

issuer string

This server's issuer, which every endpoint URL in the document is built from.

cancellationToken CancellationToken

Cancels the build.

Returns

Task<Dictionary<string, object>>

The document's members.

Exceptions

ArgumentException

issuer is 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

cancellationToken CancellationToken

Cancels the build.

Returns

Task<object>

The key set, ready to serialize.