Class SamlSchemaValidator
- Namespace
- ComponentSpace.Saml2.Utility
- Assembly
- ComponentSpace.Saml2.dll
Validates XML against the SAML XML schemas.
public class SamlSchemaValidator : ISamlSchemaValidator
- Inheritance
-
SamlSchemaValidator
- Implements
- Inherited Members
Constructors
SamlSchemaValidator(IOptionsMonitor<SamlSchemaValidatorOptions>, ILoggerFactory)
Initializes a new instance of the SamlSchemaValidator class.
public SamlSchemaValidator(IOptionsMonitor<SamlSchemaValidatorOptions> samlSchemaValidatorOptions, ILoggerFactory loggerFactory)
Parameters
samlSchemaValidatorOptionsIOptionsMonitor<SamlSchemaValidatorOptions>The SAML schema validtor options.
loggerFactoryILoggerFactoryThe logger factory.
Properties
Errors
Gets the list of XML schema errors.
public IList<string> Errors { get; }
Property Value
Warnings
Gets the list of XML schema warnings.
public IList<string> Warnings { get; }
Property Value
Methods
Validate(XmlElement)
Validates the XML against the SAML XML schemas
public bool Validate(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe XML to validate.
Returns
- bool
trueif the XML validates against the SAML XML schemas; otherwisefalse.
Exceptions
- SamlSchemaValidationException
Thrown when the attempt to perform SAML XML schema validation fails.