C# 클래스 dk.nita.saml20.Saml20Assertion

Encapsulates the functionality required of a DK-SAML 2.0 Assertion.
파일 보기 프로젝트 열기: symplified/Symplified.Auth 1 사용 예제들

Private Properties

프로퍼티 타입 설명
AddSignature void
CheckCertificateCanSign void
CheckSignature bool
ExtractAttributes void
InsertAttributes void
LoadXml void

공개 메소드들

메소드 설명
CheckSignature ( IEnumerable keys ) : bool

Check the signature of the XmlDocument using the list of keys. If the signature key is found, the SigningKey property is set.

CheckValid ( IEnumerable trustedSigners ) : void

Verifies the assertion's signature and its time to live.

GetSignatureKeys ( ) : System.Security.Cryptography.Xml.KeyInfo

Returns the KeyInfo element of the signature of the token.

GetXml ( ) : XmlElement

Gets the assertion as an XmlDocument.

IsExpired ( ) : bool

Checks if the expiration time has been exceeded.

Saml20Assertion ( ) : System

Initializes a new instance of the Saml20Assertion class.

Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, AssertionProfile profile, bool quirksMode ) : System

Initializes a new instance of the Saml20Assertion class.

Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, AssertionProfile profile, bool quirksMode, bool autoValidate ) : System

Initializes a new instance of the Saml20Assertion class.

Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, bool quirksMode ) : System

Initializes a new instance of the Saml20Assertion class.

Sign ( X509Certificate2 cert ) : void

Signs the assertion with the given certificate.

WriteAssertion ( XmlWriter writer ) : void

Writes the token to a writer.

비공개 메소드들

메소드 설명
AddSignature ( XmlDocument assertionDocument, X509Certificate2 cert ) : void
CheckCertificateCanSign ( X509Certificate2 cert ) : void
CheckSignature ( AsymmetricAlgorithm key ) : bool
ExtractAttributes ( ) : void

Extracts the list of attributes from the <AttributeStatement> of the assertion, and stores it in _assertionAttributes.

InsertAttributes ( ) : void

Merges the modified attributes into AttributeStatement of the assertion.

LoadXml ( XmlElement element, IEnumerable trustedSigners ) : void

Loads an assertion from XML.

메소드 상세

CheckSignature() 공개 메소드

Check the signature of the XmlDocument using the list of keys. If the signature key is found, the SigningKey property is set.
public CheckSignature ( IEnumerable keys ) : bool
keys IEnumerable A list of KeyDescriptor elements. Probably extracted from the metadata describing the IDP that sent the message.
리턴 bool

CheckValid() 공개 메소드

Verifies the assertion's signature and its time to live.
if the assertion's signature can not be verified or its time to live has been exceeded.
public CheckValid ( IEnumerable trustedSigners ) : void
trustedSigners IEnumerable
리턴 void

GetSignatureKeys() 공개 메소드

Returns the KeyInfo element of the signature of the token.
public GetSignatureKeys ( ) : System.Security.Cryptography.Xml.KeyInfo
리턴 System.Security.Cryptography.Xml.KeyInfo

GetXml() 공개 메소드

Gets the assertion as an XmlDocument.
public GetXml ( ) : XmlElement
리턴 System.Xml.XmlElement

IsExpired() 공개 메소드

Checks if the expiration time has been exceeded.
public IsExpired ( ) : bool
리턴 bool

Saml20Assertion() 공개 메소드

Initializes a new instance of the Saml20Assertion class.
public Saml20Assertion ( ) : System
리턴 System

Saml20Assertion() 공개 메소드

Initializes a new instance of the Saml20Assertion class.
public Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, AssertionProfile profile, bool quirksMode ) : System
assertion System.Xml.XmlElement The assertion.
trustedSigners IEnumerable If null, the signature of the given assertion is not verified.
profile AssertionProfile Determines the type of validation to perform on the token
quirksMode bool if set to true quirks mode is enabled.
리턴 System

Saml20Assertion() 공개 메소드

Initializes a new instance of the Saml20Assertion class.
public Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, AssertionProfile profile, bool quirksMode, bool autoValidate ) : System
assertion System.Xml.XmlElement The assertion.
trustedSigners IEnumerable If null, the signature of the given assertion is not verified.
profile AssertionProfile Determines the type of validation to perform on the token
quirksMode bool if set to true quirks mode is enabled.
autoValidate bool Turn automatic validation on or off
리턴 System

Saml20Assertion() 공개 메소드

Initializes a new instance of the Saml20Assertion class.
public Saml20Assertion ( XmlElement assertion, IEnumerable trustedSigners, bool quirksMode ) : System
assertion System.Xml.XmlElement The assertion.
trustedSigners IEnumerable If null, the signature of the given assertion is not verified.
quirksMode bool if set to true quirks mode is enabled.
리턴 System

Sign() 공개 메소드

Signs the assertion with the given certificate.
public Sign ( X509Certificate2 cert ) : void
cert System.Security.Cryptography.X509Certificates.X509Certificate2 The certificate to sign the assertion with.
리턴 void

WriteAssertion() 공개 메소드

Writes the token to a writer.
public WriteAssertion ( XmlWriter writer ) : void
writer System.Xml.XmlWriter The writer.
리턴 void