C# Class Thinktecture.IdentityModel.Tokens.AccessSecurityTokenHandler

SecurityTokenHandler for AccessSecurityToken
Inheritance: System.IdentityModel.Tokens.SecurityTokenHandler
Datei anzeigen Open project: IdentityModel/Thinktecture.IdentityModel.v1 Class Usage Examples

Public Methods

Method Description
CanReadToken ( XmlReader reader ) : bool

Determines whether this instance can read a AccessSecurityToken.

CreateToken ( System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor ) : System.IdentityModel.Tokens.SecurityToken

Creates the token.

GetTokenTypeIdentifiers ( ) : string[]

Gets the token type identifiers.

ReadToken ( XmlReader reader ) : System.IdentityModel.Tokens.SecurityToken

Reads the token.

ValidateToken ( System.IdentityModel.Tokens.SecurityToken token ) : ClaimsIdentityCollection

Validates the token.

WriteToken ( XmlWriter writer, System.IdentityModel.Tokens.SecurityToken token ) : void

Writes the token.

Protected Methods

Method Description
CreateClaims ( AccessSecurityToken token, string issuer ) : ClaimsIdentityCollection

Creates the claims.

GetIssuerThumbprint ( System.Security.Cryptography.Xml.SignedXml signedXml ) : string

Gets the issuer thumbprint.

ReadTokenValues ( System.Xml.Linq.XElement xml, X509Certificate2 issuerCertificate ) : AccessSecurityToken

Reads the token values.

SignToken ( System.Xml.Linq.XElement tokenXml, X509Certificate2 signer ) : System.Xml.Linq.XElement

Signs the token.

VerifySignature ( System.Xml.Linq.XElement xml ) : X509Certificate2

Verifies the signature.

Private Methods

Method Description
CheckExpiration ( AccessSecurityToken accToken ) : void

Checks the expiration.

ValidateIssuer ( X509Certificate2 issuerCertificate ) : string

Method Details

CanReadToken() public method

Determines whether this instance can read a AccessSecurityToken.
public CanReadToken ( XmlReader reader ) : bool
reader XmlReader The reader.
return bool

CreateClaims() protected method

Creates the claims.
protected CreateClaims ( AccessSecurityToken token, string issuer ) : ClaimsIdentityCollection
token AccessSecurityToken The token.
issuer string The issuer.
return ClaimsIdentityCollection

CreateToken() public method

Creates the token.
public CreateToken ( System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor ) : System.IdentityModel.Tokens.SecurityToken
tokenDescriptor System.IdentityModel.Tokens.SecurityTokenDescriptor The token descriptor.
return System.IdentityModel.Tokens.SecurityToken

GetIssuerThumbprint() protected method

Gets the issuer thumbprint.
protected GetIssuerThumbprint ( System.Security.Cryptography.Xml.SignedXml signedXml ) : string
signedXml System.Security.Cryptography.Xml.SignedXml The signed XML.
return string

GetTokenTypeIdentifiers() public method

Gets the token type identifiers.
public GetTokenTypeIdentifiers ( ) : string[]
return string[]

ReadToken() public method

Reads the token.
public ReadToken ( XmlReader reader ) : System.IdentityModel.Tokens.SecurityToken
reader XmlReader The XML reader.
return System.IdentityModel.Tokens.SecurityToken

ReadTokenValues() protected method

Reads the token values.
protected ReadTokenValues ( System.Xml.Linq.XElement xml, X509Certificate2 issuerCertificate ) : AccessSecurityToken
xml System.Xml.Linq.XElement The XML.
issuerCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 The issuer certificate.
return AccessSecurityToken

SignToken() protected method

Signs the token.
protected SignToken ( System.Xml.Linq.XElement tokenXml, X509Certificate2 signer ) : System.Xml.Linq.XElement
tokenXml System.Xml.Linq.XElement The token XML.
signer System.Security.Cryptography.X509Certificates.X509Certificate2 The signer.
return System.Xml.Linq.XElement

ValidateToken() public method

Validates the token.
public ValidateToken ( System.IdentityModel.Tokens.SecurityToken token ) : ClaimsIdentityCollection
token System.IdentityModel.Tokens.SecurityToken The token.
return ClaimsIdentityCollection

VerifySignature() protected method

Verifies the signature.
protected VerifySignature ( System.Xml.Linq.XElement xml ) : X509Certificate2
xml System.Xml.Linq.XElement The XML.
return System.Security.Cryptography.X509Certificates.X509Certificate2

WriteToken() public method

Writes the token.
public WriteToken ( XmlWriter writer, System.IdentityModel.Tokens.SecurityToken token ) : void
writer System.Xml.XmlWriter The writer.
token System.IdentityModel.Tokens.SecurityToken The token.
return void