Interface Token

  • All Known Implementing Classes:
    StringToken

    public interface Token
    This interface represents a token including its metadata.
    Author:
    Martin Stockhammer
    • Method Detail

      • getId

        String getId()
        The token id, if it exists, otherwise a empty string.
        Returns:
      • 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