Class MetadataToConfiguration
Imports SAML metadata to SAML configuration.
Inheritance
Implements
Inherited Members
Namespace: ComponentSpace.Saml2.Metadata.Import
Assembly: ComponentSpace.Saml2.dll
Syntax
public class MetadataToConfiguration : IMetadataToConfiguration
Constructors
MetadataToConfiguration(ICertificateImporter, SamlHttpClient)
Initializes a new instance of the MetadataToConfiguration
class.
Declaration
public MetadataToConfiguration(ICertificateImporter certificateImporter, SamlHttpClient samlHttpClient)
Parameters
Type | Name | Description |
---|---|---|
ICertificateImporter | certificateImporter | The certificate importer. |
SamlHttpClient | samlHttpClient | The SAML HTTP client. |
Methods
Import(EntitiesDescriptor)
Imports the SAML metadata entities descriptor.
Declaration
public SamlConfiguration Import(EntitiesDescriptor entitiesDescriptor)
Parameters
Type | Name | Description |
---|---|---|
EntitiesDescriptor | entitiesDescriptor | The entities descriptor. |
Returns
Type | Description |
---|---|
SamlConfiguration | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |
Import(EntityDescriptor)
Imports the SAML metadata entity descriptor.
Declaration
public SamlConfiguration Import(EntityDescriptor entityDescriptor)
Parameters
Type | Name | Description |
---|---|---|
EntityDescriptor | entityDescriptor | The entity descriptor. |
Returns
Type | Description |
---|---|
SamlConfiguration | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |
Import(XmlElement)
Imports the SAML metadata XML.
Declaration
public SamlConfiguration Import(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The metadata XML. |
Returns
Type | Description |
---|---|
SamlConfiguration | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |
ImportAsync(String)
Imports the SAML metadata from a file or download URL.
Declaration
public async Task<SamlConfiguration> ImportAsync(string metadataLocation)
Parameters
Type | Name | Description |
---|---|---|
System.String | metadataLocation | The SAML metadata file or download URL. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SamlConfiguration> | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |
ImportFileAsync(String)
Imports the SAML metadata file.
Declaration
public Task<SamlConfiguration> ImportFileAsync(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The SAML metadata file. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SamlConfiguration> | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |
ImportUrlAsync(String)
Imports SAML metadata from a download URL.
Declaration
public async Task<SamlConfiguration> ImportUrlAsync(string url)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The metadata download URL. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<SamlConfiguration> | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SamlException | Thrown when the SAML metadata cannot be imported. |