Class KeyDescriptor
Represents a key descriptor.
Inherited Members
Namespace: ComponentSpace.SAML2.Metadata
Assembly: ComponentSpace.Saml2.dll
Syntax
public class KeyDescriptor
  Remarks
Refer to the Metadata for the OASIS Security Assertion Markup Language (SAML) V2.0 specification for further details.
Constructors
KeyDescriptor()
Initializes a new instance of the KeyDescriptor class.
Declaration
public KeyDescriptor()
  KeyDescriptor(XmlElement)
Initializes a new instance of the KeyDescriptor class from XML.
Declaration
public KeyDescriptor(XmlElement xmlElement)
  Parameters
| Type | Name | Description | 
|---|---|---|
| XmlElement | xmlElement | The key descriptor XML.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLSerializationException | Thrown when the XML deserialization fails.  | 
      
Properties
EncryptionMethods
Gets or sets the list of encryption methods.
Declaration
public IList<XmlElement> EncryptionMethods { get; set; }
  Property Value
| Type | Description | 
|---|---|
| IList<XmlElement> | The list of encryption methods.  | 
      
KeyInfo
Gets or sets the key info.
Declaration
public XmlElement KeyInfo { get; set; }
  Property Value
| Type | Description | 
|---|---|
| XmlElement | The key info.  | 
      
Use
Gets or sets the use.
Declaration
public string Use { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | The use.  | 
      
See Also
Methods
AddEncryptionMethod(string)
Adds an encryption method with the specified algorithm.
Declaration
public void AddEncryptionMethod(string encryptionMethodAlgorithm)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | encryptionMethodAlgorithm | The encryption method algorithm.  | 
      
GetEncryptionMethodAlgorithm(XmlElement)
Gets the encryption method algorithm.
Declaration
public static string GetEncryptionMethodAlgorithm(XmlElement xmlElement)
  Parameters
| Type | Name | Description | 
|---|---|---|
| XmlElement | xmlElement | The encryption method element.  | 
      
Returns
| Type | Description | 
|---|---|
| string | The encryption method algorithm.  | 
      
IsValid(XmlElement)
Indicates whether the XML is a key descriptor.
Declaration
public static bool IsValid(XmlElement xmlElement)
  Parameters
| Type | Name | Description | 
|---|---|---|
| XmlElement | xmlElement | The XML to test.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
  | 
      
ToXml()
Serializes the entities descriptor to XML.
Declaration
public XmlElement ToXml()
  Returns
| Type | Description | 
|---|---|
| XmlElement | The entities descriptor as XML.  | 
      
Remarks
An XML document is created.
Exceptions
| Type | Condition | 
|---|---|
| SAMLSerializationException | Thrown when the XML serialization fails.  | 
      
ToXml(XmlDocument)
Serializes the key descriptor to XML.
Declaration
public XmlElement ToXml(XmlDocument xmlDocument)
  Parameters
| Type | Name | Description | 
|---|---|---|
| XmlDocument | xmlDocument | The owning XML document.  | 
      
Returns
| Type | Description | 
|---|---|
| XmlElement | The key descriptor as XML.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| SAMLSerializationException | Thrown when the XML serialization fails.  |