JwtSecurityToken Class
A class that represents a JSON Web Token (JWT).
System::Object
System.IdentityModel.Tokens::SecurityToken
System.IdentityModel.Tokens::JwtSecurityToken
System.IdentityModel.Tokens::SecurityToken
System.IdentityModel.Tokens::JwtSecurityToken
Namespace: System.IdentityModel.Tokens
Assembly: System.IdentityModel.Tokens.Jwt (in System.IdentityModel.Tokens.Jwt.dll)
The JwtSecurityToken type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | JwtSecurityToken(String) | Constructs a JwtSecurityToken from a string in JSON Web Signature (JWS) Compact serialized format. |
![]() | JwtSecurityToken(JwtHeader, JwtPayload, String) | Constructs a JwtSecurityToken where the JwtHeader contains the crypto algorithms applied to the encoded JwtHeader and JwtPayload. The jwtEncodedString is the result of those operations. |
![]() | JwtSecurityToken(String, String, IEnumerable<Claim>, Lifetime, SigningCredentials) | Constructs a JwtSecurityToken specifying optional parameters. |
| Name | Description | |
|---|---|---|
![]() | Actor | Gets the 'value' of the actor claim from JSON in the form of { actor, 'value' }. |
![]() | Audience | Gets the 'value' of the audience claim from JSON in the form of { aud, 'value' }. |
![]() | Claims | Gets the Claim(s) for this token. |
![]() | EncodedHeader | Gets the [Base64UrlEncoded] JwtHeader associated with this instance. |
![]() | EncodedPayload | Gets the [Base64UrlEncoded] JwtPayload associated with this instance. |
![]() | EncodedSignature | Gets the current signature over the JWT. |
![]() | Expiration | Gets the 'value' of the expiration claim from JSON in the form of { aud, 'exp' }. |
![]() | Header | Gets the JwtHeader associated with this instance. |
![]() | Id | Gets the 'value' of the JWT ID claim from JSON in the form of { jti, 'value' }. (Overrides SecurityToken::Id.) |
![]() | IssuedAt | Gets the 'value' of the Issued At claim from JSON in the form of { iat, 'value' }. |
![]() | Issuer | Gets the 'value' of the issuer claim from JSON in the form of { iss, 'value' }. |
![]() | Payload | Gets the JwtPayload associated with this instance. |
![]() | RawData | Gets the original raw data of this instance when it was created. |
![]() | SecurityKeys | Gets a collection of SecurityKey objects for this instance. (Overrides SecurityToken::SecurityKeys.) |
![]() | SignatureAlgorithm | Gets the signature algorithm associated with this instance. |
![]() | SigningCredentials | Gets the SigningCredentials associated with this instance. |
![]() | SigningKey | Gets or sets the SecurityKey that signed this instance. |
![]() | SigningToken | Gets or sets the SecurityToken that contains a SecurityKey that signed this instance. |
![]() | Subject | Gets ‘value’ of the subject claim from JSON in the form of { sub, 'value' }. |
![]() | ValidFrom | Gets 'value' of the notbefore claim from JSON in the form of { nbf, 'value' } converted to a DateTime object assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z). (Overrides SecurityToken::ValidFrom.) |
![]() | ValidTo | Gets 'value' of the expiration claim from JSON in the form of { exp, 'value' } converted to a DateTime assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z). (Overrides SecurityToken::ValidTo.) |
| Name | Description | |
|---|---|---|
![]() | CanCreateKeyIdentifierClause<T> | Gets a value that indicates whether this security token is capable of creating the specified key identifier. (Inherited from SecurityToken.) |
![]() | CreateKeyIdentifierClause<T> | Creates the specified key identifier clause. (Inherited from SecurityToken.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MatchesKeyIdentifierClause | Returns a value that indicates whether the key identifier for this instance can be resolved to the specified key identifier. (Inherited from SecurityToken.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ResolveKeyIdentifierClause | Gets the key for the specified key identifier clause. (Inherited from SecurityToken.) |
![]() | ToString | Decodes the JwtHeader and JwtPayload. (Overrides Object::ToString().) |
Show:


