JsonWebTokenHandler Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A SecurityTokenHandler designed for creating and validating Json Web Tokens. See: https://datatracker.ietf.org/doc/html/rfc7519 and http://www.rfc-editor.org/info/rfc7515.
public class JsonWebTokenHandler : Microsoft.IdentityModel.Tokens.TokenHandler
type JsonWebTokenHandler = class
inherit TokenHandler
Public Class JsonWebTokenHandler
Inherits TokenHandler
- Inheritance
Remarks
This partial class is focused on TokenCreation.
Constructors
JsonWebTokenHandler() |
Initializes a new instance of the JsonWebTokenHandler class. |
Fields
Base64UrlEncodedUnsignedJWSHeader |
Gets the Base64Url encoded string representation of the following JWT header: { Alg, None }. |
DefaultInboundClaimTypeMap |
Default claim type mapping for inbound claims. |
DefaultMapInboundClaims |
Default value for the flag that determines whether or not the InboundClaimTypeMap is used. |
Properties
CanValidateToken |
Returns a value that indicates if this handler can validate a SecurityToken. |
InboundClaimTypeMap |
Gets or sets the InboundClaimTypeMap which is used when setting the Type for claims in the ClaimsPrincipal extracted when validating a JsonWebToken. The Type is set to the JSON claim 'name' after translating using this mapping. The default value is ClaimTypeMapping.InboundClaimTypeMap. |
MapInboundClaims |
Gets or sets the MapInboundClaims property which is used when determining whether or not to map claim types that are extracted when validating a JsonWebToken. If this is set to true, the Type is set to the JSON claim 'name' after translating using this mapping. Otherwise, no mapping occurs. The default value is false. |
MaximumTokenSizeInBytes |
Gets and sets the maximum token size in bytes that will be processed. (Inherited from TokenHandler) |
SetDefaultTimesOnTokenCreation |
Gets or sets a bool that controls if token creation will set default 'exp', 'nbf' and 'iat' if not specified. (Inherited from TokenHandler) |
ShortClaimTypeProperty |
Gets or sets the property name of Properties the will contain the original JSON claim 'name' if a mapping occurred when the Claim(s) were created. |
TokenLifetimeInMinutes |
Gets or sets the token lifetime in minutes. (Inherited from TokenHandler) |
TokenType |
Gets the type of the JsonWebToken. |