Class SAMLConfigurationFile
Loads and saves SAML configuration files.
Inheritance
Inherited Members
Namespace: ComponentSpace.SAML2.Configuration
Assembly: ComponentSpace.Saml2.dll
Syntax
public static class SAMLConfigurationFile
Properties
ReloadOnConfigurationChange
Gets or sets the flag indicating whether the application should be reloaded if the configuration file changes.
Declaration
public static bool ReloadOnConfigurationChange { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The flag indicating whether the application should be reloaded if the configuration file changes. |
Methods
Load()
Loads the configuration from the saml.config file.
The configuration file path may be specified by the SAMLConfigFile application setting in web.config.
Otherwise, the saml.config is assumed to be in the application folder.
Declaration
public static SAMLConfigurations Load()
Returns
Type | Description |
---|---|
SAMLConfigurations | The SAML configurations. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configuration cannot be loaded. |
Load(String)
Loads the configuration from the specified file.
Declaration
public static SAMLConfigurations Load(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The configuration file. |
Returns
Type | Description |
---|---|
SAMLConfigurations | The SAML configurations. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configuration cannot be loaded. |
Save(SAMLConfiguration)
Saves the configuration to the saml.config file.
The configuration file path may be specified by the SAMLConfigFile application setting in web.config.
Otherwise, the saml.config is assumed to be in the application folder.
Declaration
public static void Save(SAMLConfiguration samlConfiguration)
Parameters
Type | Name | Description |
---|---|---|
SAMLConfiguration | samlConfiguration | The SAML configuration. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configuration cannot be saved. |
Save(SAMLConfiguration, String)
Saves the configuration to the file.
Declaration
public static void Save(SAMLConfiguration samlConfiguration, string fileName)
Parameters
Type | Name | Description |
---|---|---|
SAMLConfiguration | samlConfiguration | The SAML configuration. |
System.String | fileName | The configuration file. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configuration cannot be saved. |
Save(SAMLConfigurations)
Saves the configurations to the saml.config file.
The configuration file path may be specified by the SAMLConfigFile application setting in web.config.
Otherwise, the saml.config is assumed to be in the application folder.
Declaration
public static void Save(SAMLConfigurations samlConfigurations)
Parameters
Type | Name | Description |
---|---|---|
SAMLConfigurations | samlConfigurations | The SAML configurations. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configurations cannot be saved. |
Save(SAMLConfigurations, String)
Saves the configurations to the file.
Declaration
public static void Save(SAMLConfigurations samlConfigurations, string fileName)
Parameters
Type | Name | Description |
---|---|---|
SAMLConfigurations | samlConfigurations | The SAML configurations. |
System.String | fileName | The configuration file. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the SAML configurations cannot be saved. |
Validate(String)
Validates the configuration file against the XML schema.
Declaration
public static void Validate(string fileName)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | The configuration file. |
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the validation fails. |