Udostępnij za pośrednictwem


JwtSecurityTokenHandler.CreateClaimsIdentity Method

Definition

Creates a ClaimsIdentity from a JwtSecurityToken.

protected virtual System.Security.Claims.ClaimsIdentity CreateClaimsIdentity (System.IdentityModel.Tokens.Jwt.JwtSecurityToken jwtToken, string issuer, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters);
abstract member CreateClaimsIdentity : System.IdentityModel.Tokens.Jwt.JwtSecurityToken * string * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> System.Security.Claims.ClaimsIdentity
override this.CreateClaimsIdentity : System.IdentityModel.Tokens.Jwt.JwtSecurityToken * string * Microsoft.IdentityModel.Tokens.TokenValidationParameters -> System.Security.Claims.ClaimsIdentity
Protected Overridable Function CreateClaimsIdentity (jwtToken As JwtSecurityToken, issuer As String, validationParameters As TokenValidationParameters) As ClaimsIdentity

Parameters

jwtToken
JwtSecurityToken

The JwtSecurityToken to use as a Claim source.

issuer
String

The value to set Issuer

validationParameters
TokenValidationParameters

The TokenValidationParameters to be used for validating the token.

Returns

A ClaimsIdentity containing the Claims.

Applies to