Package com.okta.jwt.impl
Class DefaultJwt
java.lang.Object
com.okta.jwt.impl.DefaultJwt
- All Implemented Interfaces:
Jwt
Default simple bean implementation of
Jwt.
Classes in this `impl` implementation package may change in NON backward compatible way, and should ONLY be used as
a "runtime" dependency.-
Constructor Summary
ConstructorsConstructorDescriptionDefaultJwt(String tokenValue, java.time.Instant issuedAt, java.time.Instant expiresAt, Map<String, Object> claims) Creates an instance based on input from an already parsed and validated JWT. -
Method Summary
Modifier and TypeMethodDescriptionReturns the token body clams as Map.java.time.InstantReturns the `exp` claim value as anInstant.java.time.InstantReturns the `iat` claim value as anInstant.Returns the original string representation of this JWT.
-
Constructor Details
-
DefaultJwt
public DefaultJwt(String tokenValue, java.time.Instant issuedAt, java.time.Instant expiresAt, Map<String, Object> claims) Creates an instance based on input from an already parsed and validated JWT.- Parameters:
tokenValue- Original JWT stringissuedAt- The value from theiatclaim, as anInstantexpiresAt- The value from theexpclaim, as anInstantclaims- A map of the original claim values in the JWT
-
-
Method Details
-
getTokenValue
Description copied from interface:JwtReturns the original string representation of this JWT.- Specified by:
getTokenValuein interfaceJwt- Returns:
- original JWT string representation
-
getIssuedAt
public java.time.Instant getIssuedAt()Description copied from interface:JwtReturns the `iat` claim value as anInstant.- Specified by:
getIssuedAtin interfaceJwt- Returns:
- `iat` claim value
-
getExpiresAt
public java.time.Instant getExpiresAt()Description copied from interface:JwtReturns the `exp` claim value as anInstant.- Specified by:
getExpiresAtin interfaceJwt- Returns:
- `exp` claim value
-
getClaims
Description copied from interface:JwtReturns the token body clams as Map.
-