Table of Contents

Class SamlMetadataResponseGenerator

Namespace
Fdyay.IdentityServer.Saml.Metadata
Assembly
Fdyay.IdentityServer.Saml.dll

The default ISamlMetadataResponseGenerator, open for a host to extend. Duende's Saml2MetadataResponseGenerator.

public class SamlMetadataResponseGenerator : ISamlMetadataResponseGenerator
Inheritance
SamlMetadataResponseGenerator
Implements
Inherited Members

Remarks

Duende 8.0.1's, measured: one EntityDescriptor with an ID, cacheDuration and validUntil from Metadata, one signing KeyDescriptor per key, the logout and sign-on services, the NameID formats and WantAuthnRequestsSigned. Its one step, GenerateEntityDescriptorAsync(string, IEnumerable<X509Certificate2>, SamlOptions, string, CancellationToken), is protected virtual, as Duende's is, so a host adds to the document — an organisation, contacts, extensions — without rebuilding it.

Constructors

SamlMetadataResponseGenerator(TimeProvider)

Creates the generator.

public SamlMetadataResponseGenerator(TimeProvider time)

Parameters

time TimeProvider

The clock the document's validUntil is counted from.

Methods

GenerateEntityDescriptorAsync(string, IEnumerable<X509Certificate2>, SamlOptions, string, CancellationToken)

Builds the EntityDescriptor.

protected virtual Task<XmlDocument> GenerateEntityDescriptorAsync(string issuer, IEnumerable<X509Certificate2> signingKeys, SamlOptions options, string baseUrl, CancellationToken ct)

Parameters

issuer string
signingKeys IEnumerable<X509Certificate2>
options SamlOptions
baseUrl string
ct CancellationToken

Returns

Task<XmlDocument>

GenerateMetadataAsync(string, IEnumerable<X509Certificate2>, SamlOptions, string, CancellationToken)

The metadata for issuer, publishing signingKeys.

public Task<SamlMetadataResult> GenerateMetadataAsync(string issuer, IEnumerable<X509Certificate2> signingKeys, SamlOptions options, string baseUrl, CancellationToken ct)

Parameters

issuer string

The entity id this server signs as.

signingKeys IEnumerable<X509Certificate2>

The certificates to publish as signing keys, in order.

options SamlOptions

The SAML options.

baseUrl string

The base URL the endpoints are served under.

ct CancellationToken

The cancellation token.

Returns

Task<SamlMetadataResult>