Class SamlCachedConfigurationResolver
Resolves configuration via a cache of the SAML configuration provided by the underlying configuration resolver.
Inherited Members
Namespace: ComponentSpace.Saml2.Configuration.Resolver
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SamlCachedConfigurationResolver : ISamlCachedConfigurationResolver, ISamlConfigurationResolver
Constructors
SamlCachedConfigurationResolver(IOptionsMonitor<SamlCachedConfigurationResolverOptions>, IServiceProvider, IMemoryCache, ILoggerFactory)
Initializes a new instance of the SamlCachedConfigurationResolver
class.
Declaration
public SamlCachedConfigurationResolver(IOptionsMonitor<SamlCachedConfigurationResolverOptions> samlCachedConfigurationResolverOptions, IServiceProvider serviceProvider, IMemoryCache memoryCache, ILoggerFactory loggerFactory)
Parameters
Type | Name | Description |
---|---|---|
IOptionsMonitor<SamlCachedConfigurationResolverOptions> | samlCachedConfigurationResolverOptions | The cached SAML configuration resolver options. |
IServiceProvider | serviceProvider | The service provider used to instantiate the SAML configuration resolver being cached. |
IMemoryCache | memoryCache | The memory cache used to store configuration. |
ILoggerFactory | loggerFactory | The logger factory. |
Methods
GetLocalIdentityProviderConfigurationAsync(string)
Gets the LocalIdentityProviderConfiguration
.
Declaration
public virtual Task<LocalIdentityProviderConfiguration> GetLocalIdentityProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<LocalIdentityProviderConfiguration> | A task that represents the operation and returns the local identity provider configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the local identity provider configuration cannot be found. |
GetLocalServiceProviderConfigurationAsync(string)
Gets the LocalServiceProviderConfiguration
.
Declaration
public virtual Task<LocalServiceProviderConfiguration> GetLocalServiceProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<LocalServiceProviderConfiguration> | A task that represents the operation and returns the local service provider configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the local service provider configuration cannot be found. |
GetPartnerIdentityProviderConfigurationAsync(string, string)
Gets the PartnerIdentityProviderConfiguration
given the partner name.
Declaration
public virtual Task<PartnerIdentityProviderConfiguration> GetPartnerIdentityProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
string | partnerName | The partner name. |
Returns
Type | Description |
---|---|
Task<PartnerIdentityProviderConfiguration> | A task that represents the operation and returns the partner identity provider configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the partner identity provider configuration cannot be found. |
GetPartnerIdentityProviderNamesAsync(string)
Gets the names of the partner identity providers.
Declaration
public virtual Task<IList<string>> GetPartnerIdentityProviderNamesAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<IList<string>> | A task that represents the operation and returns the names of the partner identity providers. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the partner identity provider names cannot be retrieved. |
GetPartnerServiceProviderConfigurationAsync(string, string)
Gets the PartnerServiceProviderConfiguration
given the partner name.
Declaration
public virtual Task<PartnerServiceProviderConfiguration> GetPartnerServiceProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
string | partnerName | The partner name. |
Returns
Type | Description |
---|---|
Task<PartnerServiceProviderConfiguration> | A task that represents the operation and returns the partner service provider configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the partner service provider configuration cannot be found. |
GetPartnerServiceProviderNamesAsync(string)
Gets the names of the partner service providers.
Declaration
public virtual Task<IList<string>> GetPartnerServiceProviderNamesAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<IList<string>> | A task that represents the operation and returns the names of the partner service providers. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the partner service provider names cannot be retrieved. |
IsLocalIdentityProviderAsync(string)
Indicates whether a local identity provider is configured.
Declaration
public virtual Task<bool> IsLocalIdentityProviderAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<bool> |
|
IsLocalServiceProviderAsync(string)
Indicates whether a local service provider is configured.
Declaration
public virtual Task<bool> IsLocalServiceProviderAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task<bool> |
|
RemoveLocalIdentityProviderConfigurationAsync(string)
Removes the local identity provider configuration from the cache.
Declaration
public virtual Task RemoveLocalIdentityProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task | A task that represents the operation. |
RemoveLocalServiceProviderConfigurationAsync(string)
Removes the local service provider configuration from the cache.
Declaration
public virtual Task RemoveLocalServiceProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
Task | A task that represents the operation. |
RemovePartnerIdentityProviderConfigurationAsync(string, string)
Removes the partner identity provider configuration from the cache.
Declaration
public virtual Task RemovePartnerIdentityProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
string | partnerName | The partner name. |
Returns
Type | Description |
---|---|
Task | A task that represents the operation. |
RemovePartnerServiceProviderConfigurationAsync(string, string)
Removes the partner service provider configuration from the cache.
Declaration
public virtual Task RemovePartnerServiceProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
string | configurationName | The configuration name or |
string | partnerName | The partner name. |
Returns
Type | Description |
---|---|
Task | A task that represents the operation. |
ToString()
Returns the configuration as a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | The configuration as a string. |