Class DefaultJwt

java.lang.Object
com.okta.jwt.impl.DefaultJwt
All Implemented Interfaces:
com.okta.jwt.Jwt

public class DefaultJwt extends Object implements com.okta.jwt.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 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 string
      issuedAt - The value from the iat claim, as an Instant
      expiresAt - The value from the exp claim, as an Instant
      claims - A map of the original claim values in the JWT
  • Method Details

    • getTokenValue

      public String getTokenValue()
      Specified by:
      getTokenValue in interface com.okta.jwt.Jwt
    • getIssuedAt

      public java.time.Instant getIssuedAt()
      Specified by:
      getIssuedAt in interface com.okta.jwt.Jwt
    • getExpiresAt

      public java.time.Instant getExpiresAt()
      Specified by:
      getExpiresAt in interface com.okta.jwt.Jwt
    • getClaims

      public Map<String,Object> getClaims()
      Specified by:
      getClaims in interface com.okta.jwt.Jwt