Interface Token
-
- All Known Implementing Classes:
StringToken
public interface Token
This interface represents a token including its metadata.- Author:
- Martin Stockhammer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]
getBytes()
The token as byte arrayString
getData()
The string representation of the token data.String
getId()
The token id, if it exists, otherwise a empty string.TokenData
getMetadata()
The token meta data, like expiration time.TokenType
getType()
Returns the token type (access or refresh token)
-
-
-
Method Detail
-
getType
TokenType getType()
Returns the token type (access or refresh token)- Returns:
- the token type
-
getData
String getData()
The string representation of the token data. It depends on the token algorithm, what kind of string conversion is used (e.g. Base64)- Returns:
- the token string
-
getBytes
byte[] getBytes()
The token as byte array- Returns:
-
getMetadata
TokenData getMetadata()
The token meta data, like expiration time.- Returns:
- the metadata
-
-