Show / Hide Table of Contents

Class MetadataToConfiguration

Imports SAML metadata to SAML configuration.

Inheritance
System.Object
MetadataToConfiguration
Implements
IMetadataToConfiguration
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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.

Implements

IMetadataToConfiguration
In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2017-2022. All rights reserved.