Show / Hide Table of Contents

Class SAMLValidator

Provides methods for validating SAML assertion, protocol and metadata XML against the SAML, XML signature and XML encryption schemas.

Inheritance
System.Object
SAMLValidator
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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

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

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

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

Exceptions
Type Condition
SAMLException

Thrown when the validation fails.

In This Article
Back to top Copyright © ComponentSpace Pty Ltd 2004-2022. All rights reserved.