Class SAMLValidator
Provides methods for validating SAML assertion, protocol and metadata XML against the SAML, XML signature and XML encryption schemas.
Inheritance
Inherited Members
Namespace: ComponentSpace.SAML2.Schemas
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SAMLValidator
Properties
Errors
Gets the errors associated with the last validation.
Declaration
public IList<XmlSchemaException> Errors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Xml.Schema.XmlSchemaException> | The errors. |
ExtensionSchemaFileNames
Gets the list of extension XML schema file names.
Declaration
public static IList<string> ExtensionSchemaFileNames { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The list of extension XML schema file names. |
Warnings
Gets the warnings associated with the last validation.
Declaration
public IList<XmlSchemaException> Warnings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.Xml.Schema.XmlSchemaException> | The warnings. |
Methods
Validate(XmlDocument)
Validates the SAML assertion, protocol or metadata XML against the SAML, XML signature and XML encryption schemas.
Declaration
public bool Validate(XmlDocument xmlDocument)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlDocument | xmlDocument | The XML to validate |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the validation fails. |
Validate(XmlElement)
Validates the SAML assertion, protocol or metadata XML against the SAML, XML signature and XML encryption schemas.
Declaration
public bool Validate(XmlElement xmlElement)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.XmlElement | xmlElement | The XML to validate |
Returns
Type | Description |
---|---|
System.Boolean |
|
Exceptions
Type | Condition |
---|---|
SAMLException | Thrown when the validation fails. |