JWTInterface
Hierarchy
Implemented by
Index
Properties
readonlyallClaims
Returns the collection of custom claims this object contains.
Unlike the claims property, this returns values as strings.
readonlyclaims
readonlycustomClaims
Returns the collection of custom claims this object contains.
Unlike the `claims` property, this returns values as strings.
optionalreadonlyexpiresAt
The calculated date at which this object will expire.
readonlyexpiresIn
Time interval from the issue date when the object will expire.
readonlyheader
The header portion of the JWT token.
readonlyisExpired
Indicates if this object has expired.
readonlyisValid
Indicates if this object is valid.
optionalreadonlyissuedAt
The date this object was issued, from which the expiration time will be calculated.
readonlypayload
Raw payload of claims, as a dictionary representation.
Methods
optionalarrayValue
Returns an array of claim values from this JWT token, with the given key and expected return type.
Type parameters
- ValueType: ClaimConvertable<JWTClaim>
Parameters
type: ValueType
The type the value is expected to be, or should be converted to (using ClaimConvertible).
key: String
The key to use when extracting the claim.
Returns ValueType[]
The value for the supplied claim of the requested type.
validate
Verifies the JWT token using the given
`JWK`key.Parameters
using: JWKS
Returns Boolean
Returns whether or not signing passes for this token/key combination.
optionalvalue
Returns a claim value from this JWT token, with the given key and expected return type.
Type parameters
- ValueType: ClaimConvertable<JWTClaim>
Parameters
type: ValueType
The type the value is expected to be, or should be converted to (using ClaimConvertible).
key: String
The key to use when extracting the claim.
Returns ValueType
The value for the supplied claim of the requested type.
Represents the contents of a JWT token, providing access to its payload contents.