Class DynamicSamlProviderConfigurator
- Namespace
- Fdyay.IdentityServer.Saml.Sp
- Assembly
- Fdyay.IdentityServer.Saml.dll
Reads a stored SamlProvider row, and a host's SamlAuthenticationOptions, into SamlSpOptions.
public sealed class DynamicSamlProviderConfigurator : IConfigureDynamicProvider<SamlSpOptions>
- Inheritance
-
DynamicSamlProviderConfigurator
- Implements
- Inherited Members
Remarks
Measured from Duende 8.0.1's SamlConfigureOptions: the sign-in and sign-out schemes, entity id and
outbound signing algorithm from SamlAuthenticationOptions where a host set them; the identity
provider — entity id, single sign-on and logout addresses, binding, signing key, unsolicited responses — from the
row; this server's signing certificate from the row's PKCS#12. Where it differs is the addresses. Duende's
handler serves every SAML scheme under one module path; this server's has one assertion consumer, signed-out
callback and metadata address per scheme, so they sit under DynamicProviderOptions.PathPrefix beside the
scheme's name, where the mechanism already routes a request to the scheme that owns it.
Constructors
DynamicSamlProviderConfigurator(IOptions<DynamicProviderOptions>, IOptionsFactory<SamlAuthenticationOptions>, IIssuerNameService, ILogger<DynamicSamlProviderConfigurator>)
Creates the configurator.
public DynamicSamlProviderConfigurator(IOptions<DynamicProviderOptions> options, IOptionsFactory<SamlAuthenticationOptions> authenticationOptions, IIssuerNameService issuerNameService, ILogger<DynamicSamlProviderConfigurator> logger)
Parameters
optionsIOptions<DynamicProviderOptions>The dynamic provider options: the default sign-in and sign-out schemes and the path prefix the scheme's addresses sit under.
authenticationOptionsIOptionsFactory<SamlAuthenticationOptions>Creates the host's SamlAuthenticationOptions for a scheme, which win over the row.
issuerNameServiceIIssuerNameServiceSupplies the service provider entity id when neither the host nor the row names one.
loggerILogger<DynamicSamlProviderConfigurator>Where a request not to want signed assertions is logged as ignored.
Methods
Configure(IdentityProvider, SamlSpOptions)
Fills options from provider's row and the host's options for its scheme.
public void Configure(IdentityProvider provider, SamlSpOptions options)
Parameters
providerIdentityProviderThe stored provider row; read as a SamlProvider.
optionsSamlSpOptionsThe handler options to fill.
Exceptions
- ArgumentNullException
Either argument is null.
- InvalidOperationException
No entity id is set for this service provider and there is no issuer to use instead.