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
timeTimeProviderThe clock the document's
validUntilis 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
issuerstringsigningKeysIEnumerable<X509Certificate2>optionsSamlOptionsbaseUrlstringctCancellationToken
Returns
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
issuerstringThe entity id this server signs as.
signingKeysIEnumerable<X509Certificate2>The certificates to publish as signing keys, in order.
optionsSamlOptionsThe SAML options.
baseUrlstringThe base URL the endpoints are served under.
ctCancellationTokenThe cancellation token.