Class SamlCachedConfigurationResolver
Resolves configuration via a cache of the SAML configuration provided by the underlying configuration resolver.
Inheritance
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 |
---|---|---|
Microsoft.Extensions.Options.IOptionsMonitor<SamlCachedConfigurationResolverOptions> | samlCachedConfigurationResolverOptions | The cached SAML configuration resolver options. |
System.IServiceProvider | serviceProvider | The service provider used to instantiate the SAML configuration resolver being cached. |
Microsoft.Extensions.Caching.Memory.IMemoryCache | memoryCache | The memory cache used to store configuration. |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | The logger factory. |
Methods
GetLocalIdentityProviderConfigurationAsync(String)
Gets the LocalIdentityProviderConfiguration
.
Declaration
public virtual async Task<LocalIdentityProviderConfiguration> GetLocalIdentityProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 async Task<LocalServiceProviderConfiguration> GetLocalServiceProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 async Task<PartnerIdentityProviderConfiguration> GetPartnerIdentityProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
System.String | partnerName | The partner name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 async Task<IList<string>> GetPartnerIdentityProviderNamesAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.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 async Task<PartnerServiceProviderConfiguration> GetPartnerServiceProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
System.String | partnerName | The partner name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 async Task<IList<string>> GetPartnerServiceProviderNamesAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IList<System.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 async Task<bool> IsLocalIdentityProviderAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
|
IsLocalServiceProviderAsync(String)
Indicates whether a local service provider is configured.
Declaration
public virtual async Task<bool> IsLocalServiceProviderAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> |
|
RemoveLocalIdentityProviderConfigurationAsync(String)
Removes the local identity provider configuration from the cache.
Declaration
public virtual async Task RemoveLocalIdentityProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
RemoveLocalServiceProviderConfigurationAsync(String)
Removes the local service provider configuration from the cache.
Declaration
public virtual async Task RemoveLocalServiceProviderConfigurationAsync(string configurationName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
RemovePartnerIdentityProviderConfigurationAsync(String, String)
Removes the partner identity provider configuration from the cache.
Declaration
public virtual async Task RemovePartnerIdentityProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
System.String | partnerName | The partner name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
RemovePartnerServiceProviderConfigurationAsync(String, String)
Removes the partner service provider configuration from the cache.
Declaration
public virtual async Task RemovePartnerServiceProviderConfigurationAsync(string configurationName = null, string partnerName = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | configurationName | The configuration name or |
System.String | partnerName | The partner name. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task that represents the operation. |
ToString()
Returns the configuration as a string.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The configuration as a string. |