Class SamlSchemaValidator
Validates XML against the SAML XML schemas.
Inheritance
System.Object
SamlSchemaValidator
Implements
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.Utility
Assembly: ComponentSpace.Saml2.dll
Syntax
public class SamlSchemaValidator : ISamlSchemaValidator
Constructors
SamlSchemaValidator(IOptionsMonitor<SamlSchemaValidatorOptions>, ILoggerFactory)
Initializes a new instance of the SamlSchemaValidator
class.
Declaration
public SamlSchemaValidator(IOptionsMonitor<SamlSchemaValidatorOptions> samlSchemaValidatorOptions, ILoggerFactory loggerFactory)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Options.IOptionsMonitor<SamlSchemaValidatorOptions> | samlSchemaValidatorOptions | The SAML schema validtor options. |
Microsoft.Extensions.Logging.ILoggerFactory | loggerFactory | The logger factory. |
Properties
Errors
Gets the list of XML schema errors.
Declaration
public IList<string> Errors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The list of XML schema errors. |
Warnings
Gets the list of XML schema warnings.
Declaration
public IList<string> Warnings { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<System.String> | The list of XML schema warnings. |
Methods
Validate(XmlElement)
Validates the XML against the SAML XML 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 |
---|---|
SamlSchemaValidationException | Thrown when the attempt to perform SAML XML schema validation fails. |