Class StringToken
- java.lang.Object
-
- org.apache.archiva.redback.authentication.StringToken
-
- All Implemented Interfaces:
Token
public class StringToken extends Object implements Token
Simple token implementation. This implementation is immutable.- Author:
- Martin Stockhammer
-
-
Constructor Summary
Constructors Constructor Description StringToken(String id, String tokenData, TokenData metadata)
StringToken(TokenType type, String id, String tokenData, TokenData metadata)
-
Method Summary
All Methods Instance Methods Concrete 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)
-
-
-
Constructor Detail
-
StringToken
public StringToken(String id, String tokenData, TokenData metadata)
-
StringToken
public StringToken(TokenType type, String id, String tokenData, TokenData metadata)
-
-
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)
-
getMetadata
public TokenData getMetadata()
Description copied from interface:Token
The token meta data, like expiration time.- Specified by:
getMetadata
in interfaceToken
- Returns:
- the metadata
-
getId
public String getId()
Description copied from interface:Token
The token id, if it exists, otherwise a empty string.
-
-