Class Jwt
java.lang.Object
com.revetsec.jose.Jwt
A JWT that
JwtValidator.validateResult(String) accepted: its signature verified with a trusted key, and its type,
issuer, audience, lifetime and required claims passed. Only a validator creates one, so holding a Jwt means
the token was validated.
The token is a bearer credential. toCompactSerialization() returns it as received, for code that must
forward it; toString() shows only the algorithm. Instances compare by reference, never by content.
- Since:
- 1.0.0
- Author:
- Mark Allen
-
Method Summary
Modifier and TypeMethodDescriptionReturns the algorithm the token was signed with (alg).Returns the token's claims.getKeyId()Returns the header's key ID (kid), which named the key that verified the token.getType()Returns the header's type (typ) exactly as received, before the comparison that folds case and impliesapplication/.Returns the token exactly as it was received: a bearer credential, so treat it as a secret.toString()Describes the token by its algorithm only.
-
Method Details
-
getAlgorithm
Returns the algorithm the token was signed with (alg).- Returns:
- the algorithm
- Since:
- 1.0.0
-
getKeyId
-
getType
-
getClaims
-
toCompactSerialization
Returns the token exactly as it was received: a bearer credential, so treat it as a secret.- Returns:
- the compact serialization
- Since:
- 1.0.0
-
toString
-