Class AbstractJsonWebToken

java.lang.Object
org.eclipse.ditto.jwt.model.AbstractJsonWebToken
All Implemented Interfaces:
JsonWebToken
Direct Known Subclasses:
ImmutableJsonWebToken

public abstract class AbstractJsonWebToken extends Object implements JsonWebToken
Abstract implementation of JsonWebToken.
  • Constructor Details

    • AbstractJsonWebToken

      protected AbstractJsonWebToken(JsonWebToken jsonWebToken)
    • AbstractJsonWebToken

      protected AbstractJsonWebToken(String token)
  • Method Details

    • getHeader

      public org.eclipse.ditto.json.JsonObject getHeader()
      Description copied from interface: JsonWebToken
      Returns the header JSON object of the token.
      Specified by:
      getHeader in interface JsonWebToken
      Returns:
      the header JSON.
    • getBody

      public org.eclipse.ditto.json.JsonObject getBody()
      Description copied from interface: JsonWebToken
      Returns the body JSON object of the token.
      Specified by:
      getBody in interface JsonWebToken
      Returns:
      the body JSON.
    • getToken

      public String getToken()
      Description copied from interface: JsonWebToken
      Returns the encoded token.
      Specified by:
      getToken in interface JsonWebToken
      Returns:
      the token.
    • getKeyId

      public String getKeyId()
      Description copied from interface: JsonWebToken
      Returns identifier of the key.
      Specified by:
      getKeyId in interface JsonWebToken
      Returns:
      the identifier.
    • getIssuer

      public String getIssuer()
      Description copied from interface: JsonWebToken
      Returns the issuer of the token.
      Specified by:
      getIssuer in interface JsonWebToken
      Returns:
      the issuer.
    • getSignature

      public String getSignature()
      Description copied from interface: JsonWebToken
      Returns the signature of the token.
      Specified by:
      getSignature in interface JsonWebToken
      Returns:
      the signature.
    • getAudience

      public Audience getAudience()
      Description copied from interface: JsonWebToken
      Returns the audience of the token.
      Specified by:
      getAudience in interface JsonWebToken
      Returns:
      the audience.
    • getAuthorizedParty

      public String getAuthorizedParty()
      Description copied from interface: JsonWebToken
      Returns the authorized party of the token.
      Specified by:
      getAuthorizedParty in interface JsonWebToken
      Returns:
      the authorized party.
    • getScopes

      public List<String> getScopes()
      Description copied from interface: JsonWebToken
      Returns the scopes of the token.
      Specified by:
      getScopes in interface JsonWebToken
      Returns:
      the scopes.
    • getExpirationTime

      public Instant getExpirationTime()
      Description copied from interface: JsonWebToken
      Returns the expiration time of the token.
      Specified by:
      getExpirationTime in interface JsonWebToken
      Returns:
      the expiration time.
    • isExpired

      public boolean isExpired()
      Description copied from interface: JsonWebToken
      Returns true if the token is expired.
      Specified by:
      isExpired in interface JsonWebToken
      Returns:
      true if token is expired otherwise false.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object