System.IdentityModel.Tokens.Jwt.JwtSecurityToken
A SecurityToken designed for representing a JSON Web Token (JWT).
Gets the 'value' of the 'actor' claim { actort, 'value' }.
Gets the list of 'audience' claim { aud, 'value' }.
Gets the Claim(s) for this token.
If this is a JWE token, this property only returns the encrypted claims;
the unencrypted claims should be read from the header seperately.
Gets the Base64UrlEncoded JwtHeader associated with this instance.
Gets the Base64UrlEncoded JwtPayload associated with this instance.
Gets the EncryptingCredentials to use when writing this token.
Gets the JwtHeader associated with this instance if the token is signed.
Gets the JwtSecurityToken associated with this instance.
Gets the 'value' of the 'issued at' claim { iat, 'value' } converted to a DateTime assuming 'value' is seconds since UnixEpoch (UTC 1970-01-01T0:0:0Z).
Gets the JwtPayload associated with this instance.
Note that if this JWT is nested ( InnerToken != null, this property represents the payload of the most inner token.
This property can be null if the content type of the most inner token is unrecognized, in that case
the content of the token is the string returned by PlainText property.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the original raw data of this instance when it was created.
Gets the signature algorithm associated with this instance.
Gets the SigningCredentials to use when writing this token.
Gets the "value" of the 'subject' claim { sub, 'value' }.
Initializes a new instance of JwtSecurityToken from a string in JWS Compact serialized format.
public JwtSecurityToken(JwtHeader header, JwtPayload payload, string rawHeader, string rawPayload, string rawSignature)
Initializes a new instance of the JwtSecurityToken class where the JwtHeader contains the crypto algorithms applied to the encoded JwtHeader and JwtPayload. The jwtEncodedString is the result of those operations.
public JwtSecurityToken(JwtHeader header, JwtSecurityToken innerToken, string rawHeader, string rawEncryptedKey, string rawInitializationVector, string rawCiphertext, string rawAuthenticationTag)
Initializes an instance of JwtSecurityToken where the JwtHeader contains the crypto algorithms applied to the innerToken JwtSecurityToken.
Initializes a new instance of the JwtSecurityToken class where the JwtHeader contains the crypto algorithms applied to the encoded JwtHeader and JwtPayload. The jwtEncodedString is the result of those operations.
public JwtSecurityToken(string issuer = null, string audience = null, IEnumerable<Claim> claims = null, DateTime? notBefore = default, DateTime? expires = default, SigningCredentials signingCredentials = null)
Initializes a new instance of the JwtSecurityToken class specifying optional parameters.