Class StringToken

  • All Implemented Interfaces:
    Token

    public class StringToken
    extends Object
    implements Token
    Simple token implementation. This implementation is immutable.
    Author:
    Martin Stockhammer
    • Method Detail

      • getData

        public String getData()
        Description copied from interface: Token
        The string representation of the token data. It depends on the token algorithm, what kind of string conversion is used (e.g. Base64)
        Specified by:
        getData in interface Token
        Returns:
        the token string
      • getBytes

        public byte[] getBytes()
        Description copied from interface: Token
        The token as byte array
        Specified by:
        getBytes in interface Token
        Returns:
      • getId

        public String getId()
        Description copied from interface: Token
        The token id, if it exists, otherwise a empty string.
        Specified by:
        getId in interface Token
        Returns:
      • getType

        public TokenType getType()
        Description copied from interface: Token
        Returns the token type (access or refresh token)
        Specified by:
        getType in interface Token
        Returns:
        the token type