C# Class Thinktecture.IdentityModel.Tokens.AccessSecurityTokenHandler

SecurityTokenHandler for AccessSecurityToken
Inheritance: System.IdentityModel.Tokens.SecurityTokenHandler
Afficher le fichier Open project: IdentityModel/Thinktecture.IdentityModel.v1 Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode Description
CheckExpiration ( AccessSecurityToken accToken ) : void

Checks the expiration.

ValidateIssuer ( X509Certificate2 issuerCertificate ) : string

Method Details

CanReadToken() public méthode

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

CreateClaims() protected méthode

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

CreateToken() public méthode

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

GetIssuerThumbprint() protected méthode

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

GetTokenTypeIdentifiers() public méthode

Gets the token type identifiers.
public GetTokenTypeIdentifiers ( ) : string[]
Résultat string[]

ReadToken() public méthode

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

ReadTokenValues() protected méthode

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.
Résultat AccessSecurityToken

SignToken() protected méthode

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.
Résultat System.Xml.Linq.XElement

ValidateToken() public méthode

Validates the token.
public ValidateToken ( System.IdentityModel.Tokens.SecurityToken token ) : ClaimsIdentityCollection
token System.IdentityModel.Tokens.SecurityToken The token.
Résultat ClaimsIdentityCollection

VerifySignature() protected méthode

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

WriteToken() public méthode

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.
Résultat void