Package org.eclipse.ditto.jwt.model
Interface JsonWebToken
- All Known Implementing Classes:
AbstractJsonWebToken,ImmutableJsonWebToken
public interface JsonWebToken
Representation for a JSON Web Token.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classAn enumeration of the knownJsonFields of a JSON Web Token. -
Method Summary
Modifier and TypeMethodDescriptionReturns the audience of the token.Returns the authorized party of the token.org.eclipse.ditto.json.JsonObjectgetBody()Returns the body JSON object of the token.Returns the expiration time of the token.org.eclipse.ditto.json.JsonObjectReturns the header JSON object of the token.Returns the issuer of the token.getKeyId()Returns identifier of the key.Returns the scopes of the token.Returns the signature of the token.Returns the subjects which can be used for authorization, e.g. the "sub" claim.getToken()Returns the encoded token.booleanReturns true if the token is expired.
-
Method Details
-
getToken
String getToken()Returns the encoded token.- Returns:
- the token.
-
getHeader
org.eclipse.ditto.json.JsonObject getHeader()Returns the header JSON object of the token.- Returns:
- the header JSON.
-
getBody
org.eclipse.ditto.json.JsonObject getBody()Returns the body JSON object of the token.- Returns:
- the body JSON.
-
getKeyId
String getKeyId()Returns identifier of the key.- Returns:
- the identifier.
-
getIssuer
String getIssuer()Returns the issuer of the token.- Returns:
- the issuer.
-
getSignature
String getSignature()Returns the signature of the token.- Returns:
- the signature.
-
getSubjects
Returns the subjects which can be used for authorization, e.g. the "sub" claim.- Returns:
- the subjects.
-
getAudience
Audience getAudience()Returns the audience of the token.- Returns:
- the audience.
-
getAuthorizedParty
String getAuthorizedParty()Returns the authorized party of the token.- Returns:
- the authorized party.
-
getScopes
Returns the scopes of the token.- Returns:
- the scopes.
-
getExpirationTime
Instant getExpirationTime()Returns the expiration time of the token.- Returns:
- the expiration time.
-
isExpired
boolean isExpired()Returns true if the token is expired.- Returns:
- true if token is expired otherwise false.
-