Table of Contents

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

samlSchemaValidatorOptions IOptionsMonitor<SamlSchemaValidatorOptions>

The SAML schema validtor options.

loggerFactory ILoggerFactory

The logger factory.

Properties

Errors

Gets the list of XML schema errors.

public IList<string> Errors { get; }

Property Value

IList<string>

The list of XML schema errors.

Warnings

Gets the list of XML schema warnings.

public IList<string> Warnings { get; }

Property Value

IList<string>

The list of XML schema warnings.

Methods

Validate(XmlElement)

Validates the XML against the SAML XML schemas

public bool Validate(XmlElement xmlElement)

Parameters

xmlElement XmlElement

The XML to validate.

Returns

bool

true if the XML validates against the SAML XML schemas; otherwise false.

Exceptions

SamlSchemaValidationException

Thrown when the attempt to perform SAML XML schema validation fails.