Class NameIDPolicy
Represents a name ID policy.
Inherited Members
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, bool)
Initializes a new instance of the NameIDPolicy class.
Declaration
public NameIDPolicy(string format, string spNameQualifier, bool allowCreate)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | format | The format.  | 
      
| string | spNameQualifier | The SP name qualifier  | 
      
| bool | 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 | 
|---|---|---|
| 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 | 
|---|---|
| bool | The allow create flag.  | 
      
Format
Gets or sets the format.
Declaration
public string Format { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | The format.  | 
      
See Also
SPNameQualifier
Gets or sets the SP name qualifier.
Declaration
public string SPNameQualifier { get; set; }
  Property Value
| Type | Description | 
|---|---|
| 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 | 
|---|---|---|
| XmlElement | xmlElement | The XML to test.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
ToXml(XmlDocument)
Serializes the name ID policy to XML.
Declaration
public XmlElement ToXml(XmlDocument xmlDocument)
  Parameters
| Type | Name | Description | 
|---|---|---|
| XmlDocument | xmlDocument | The owning XML document.  | 
      
Returns
| Type | Description | 
|---|---|
| XmlElement | The name ID policy as XML.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLSerializationException | Thrown when the XML serialization fails.  |