C# Class Thinktecture.IdentityModel.Extensions.SecurityTokensExtensions

Extension methods to convert tokens to string and claims
Afficher le fichier Open project: IdentityModel/Thinktecture.IdentityModel.v1

Méthodes publiques

Méthode Description
ToClaimsPrincipal ( this token, SecurityTokenHandlerCollection handler ) : IClaimsPrincipal

Converts a SecurityToken to an IClaimsPrincipal.

ToClaimsPrincipal ( this token, X509Certificate2 signingCertificate ) : IClaimsPrincipal

Converts a SecurityToken to an IClaimsPrincipal.

ToClaimsPrincipal ( this token, X509Certificate2 signingCertificate, string audienceUri ) : IClaimsPrincipal

Converts a SecurityToken to an IClaimsPrincipal.

ToClaimsPrincipal ( this token, string thumbprint ) : IClaimsPrincipal

Converts a SecurityToken to an IClaimsPrincipal.

ToSecurityToken ( this token ) : System.IdentityModel.Tokens.SecurityToken

Turns a supported generic XML security token to a security token.

ToSecurityToken ( this token, SecurityTokenHandlerCollection handler ) : System.IdentityModel.Tokens.SecurityToken

Turns a supported generic XML security token to a security token.

ToSecurityToken ( this token, X509Certificate2 decryptionCertificate ) : System.IdentityModel.Tokens.SecurityToken

Turns a supported generic XML security token to a security token.

ToTokenXmlString ( this token ) : string

Retrieves the XML from a GenericXmlSecurityToken

ToTokenXmlString ( this token, SecurityTokenHandlerCollection handler ) : string

Converts a supported token to an XML string.

Private Methods

Méthode Description
CreateDefaultHandlerCollection ( this configuration ) : SecurityTokenHandlerCollection
CreateIssuerNameRegistry ( this certificate ) : System.IdentityModel.Tokens.IssuerNameRegistry
CreateSecurityTokenResolver ( this certificate ) : System.IdentityModel.Selectors.SecurityTokenResolver
CreateStandardConfiguration ( X509Certificate2 signingCertificate ) : System.IdentityModel.Tokens.SecurityTokenHandlerConfiguration
CreateStandardConfiguration ( string thumbprint ) : System.IdentityModel.Tokens.SecurityTokenHandlerConfiguration

Method Details

ToClaimsPrincipal() public static méthode

Converts a SecurityToken to an IClaimsPrincipal.
public static ToClaimsPrincipal ( this token, SecurityTokenHandlerCollection handler ) : IClaimsPrincipal
token this The token.
handler SecurityTokenHandlerCollection The handler.
Résultat IClaimsPrincipal

ToClaimsPrincipal() public static méthode

Converts a SecurityToken to an IClaimsPrincipal.
public static ToClaimsPrincipal ( this token, X509Certificate2 signingCertificate ) : IClaimsPrincipal
token this The token.
signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 The signing certificate.
Résultat IClaimsPrincipal

ToClaimsPrincipal() public static méthode

Converts a SecurityToken to an IClaimsPrincipal.
public static ToClaimsPrincipal ( this token, X509Certificate2 signingCertificate, string audienceUri ) : IClaimsPrincipal
token this The token.
signingCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 The signing certificate.
audienceUri string The audience URI.
Résultat IClaimsPrincipal

ToClaimsPrincipal() public static méthode

Converts a SecurityToken to an IClaimsPrincipal.
public static ToClaimsPrincipal ( this token, string thumbprint ) : IClaimsPrincipal
token this The token.
thumbprint string The signing certificate thumbprint
Résultat IClaimsPrincipal

ToSecurityToken() public static méthode

Turns a supported generic XML security token to a security token.
public static ToSecurityToken ( this token ) : System.IdentityModel.Tokens.SecurityToken
token this The generic XML security token.
Résultat System.IdentityModel.Tokens.SecurityToken

ToSecurityToken() public static méthode

Turns a supported generic XML security token to a security token.
public static ToSecurityToken ( this token, SecurityTokenHandlerCollection handler ) : System.IdentityModel.Tokens.SecurityToken
token this The generic XML security token.
handler SecurityTokenHandlerCollection The security token handler.
Résultat System.IdentityModel.Tokens.SecurityToken

ToSecurityToken() public static méthode

Turns a supported generic XML security token to a security token.
public static ToSecurityToken ( this token, X509Certificate2 decryptionCertificate ) : System.IdentityModel.Tokens.SecurityToken
token this The token.
decryptionCertificate System.Security.Cryptography.X509Certificates.X509Certificate2 The decryption certificate.
Résultat System.IdentityModel.Tokens.SecurityToken

ToTokenXmlString() public static méthode

Retrieves the XML from a GenericXmlSecurityToken
public static ToTokenXmlString ( this token ) : string
token this The token.
Résultat string

ToTokenXmlString() public static méthode

Converts a supported token to an XML string.
public static ToTokenXmlString ( this token, SecurityTokenHandlerCollection handler ) : string
token this The token.
handler SecurityTokenHandlerCollection The token handler.
Résultat string