Show / Hide Table of Contents

Class NameIDPolicy

Represents a name ID policy.

Inheritance
System.Object
NameIDPolicy
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.Protocols
Assembly: ComponentSpace.Saml2.dll
Syntax
public class NameIDPolicy
Remarks

Refer to the Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.

Constructors

NameIDPolicy()

Initializes a new instance of the NameIDPolicy class.

Declaration
public NameIDPolicy()

NameIDPolicy(String, String, Boolean)

Initializes a new instance of the NameIDPolicy class.

Declaration
public NameIDPolicy(string format, string spNameQualifier, bool allowCreate)
Parameters
Type Name Description
System.String format

The format.

System.String spNameQualifier

The SP name qualifier

System.Boolean allowCreate

The allow create flag

NameIDPolicy(XmlElement)

Initializes a new instance of the NameIDPolicy class from XML.

Declaration
public NameIDPolicy(XmlElement xmlElement)
Parameters
Type Name Description
System.Xml.XmlElement xmlElement

The name ID policy XML.

Exceptions
Type Condition
SamlSerializationException

Thrown when the XML deserialization fails.

Properties

AllowCreate

Gets or sets the allow create flag.

Declaration
public bool? AllowCreate { get; set; }
Property Value
Type Description
System.Nullable<System.Boolean>

The allow create flag.

Format

Gets or sets the format.

Declaration
public string Format { get; set; }
Property Value
Type Description
System.String

The format.

See Also
SamlConstants.NameIdentifierFormats

SpNameQualifier

Gets or sets the SP name qualifier.

Declaration
public string SpNameQualifier { get; set; }
Property Value
Type Description
System.String

The SP name qualifier.

Methods

IsValid(XmlElement)

Indicates whether the XML is a name ID policy.

Declaration
public static bool IsValid(XmlElement xmlElement)
Parameters
Type Name Description
System.Xml.XmlElement xmlElement

The XML to test.

Returns
Type Description
System.Boolean

true if the XML is a name ID policy; otherwise false.

ToXml(XmlDocument)

Serializes the name ID policy to XML.

Declaration
public XmlElement ToXml(XmlDocument xmlDocument)
Parameters
Type Name Description
System.Xml.XmlDocument xmlDocument

The owning XML document.

Returns
Type Description
System.Xml.XmlElement

The name ID policy as XML.

Exceptions
Type Condition
SamlSerializationException

Thrown when the XML serialization fails.

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