Class NameIDPolicy
- Namespace
- ComponentSpace.Saml2.Protocols
- Assembly
- ComponentSpace.Saml2.dll
Represents a name ID policy.
public class NameIDPolicy
- Inheritance
-
NameIDPolicy
- Inherited Members
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.
public NameIDPolicy()
NameIDPolicy(string, string, bool)
Initializes a new instance of the NameIDPolicy class.
public NameIDPolicy(string format, string spNameQualifier, bool allowCreate)
Parameters
formatstringThe format.
spNameQualifierstringThe SP name qualifier
allowCreateboolThe allow create flag
NameIDPolicy(XmlElement)
Initializes a new instance of the NameIDPolicy class from XML.
public NameIDPolicy(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe name ID policy XML.
Exceptions
- SamlSerializationException
Thrown when the XML deserialization fails.
Properties
AllowCreate
Gets or sets the allow create flag.
public bool? AllowCreate { get; set; }
Property Value
- bool?
The allow create flag.
Format
Gets or sets the format.
public string Format { get; set; }
Property Value
- string
The format.
- See Also
SpNameQualifier
Gets or sets the SP name qualifier.
public string SpNameQualifier { get; set; }
Property Value
- string
The SP name qualifier.
Methods
IsValid(XmlElement)
Indicates whether the XML is a name ID policy.
public static bool IsValid(XmlElement xmlElement)
Parameters
xmlElementXmlElementThe XML to test.
Returns
- bool
trueif the XML is a name ID policy; otherwisefalse.
ToXml(XmlDocument)
Serializes the name ID policy to XML.
public XmlElement ToXml(XmlDocument xmlDocument)
Parameters
xmlDocumentXmlDocumentThe owning XML document.
Returns
- XmlElement
The name ID policy as XML.
Exceptions
- SamlSerializationException
Thrown when the XML serialization fails.