Package org.opencms.security
Class CmsPersistentLoginTokenHandler.Token
- java.lang.Object
-
- org.opencms.security.CmsPersistentLoginTokenHandler.Token
-
- Enclosing class:
- CmsPersistentLoginTokenHandler
public static class CmsPersistentLoginTokenHandler.Token extends java.lang.Object
Bean representing the data encoded in a login token (user name and key).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSEPARATORSeparator to use for the encoded token string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringencode()Gets the encoded token string representation.java.lang.StringgetAdditionalInfoKey()Gets the additional info key to use for this token.java.lang.StringgetKey()Gets the key for this token.java.lang.StringgetName()Gets the user name for this token.booleanisValid()Checks if this token is valid.
-
-
-
Field Detail
-
SEPARATOR
public static final java.lang.String SEPARATOR
Separator to use for the encoded token string.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Token
public Token(java.lang.String token)
Creates a new token object from the encoded representation.- Parameters:
token- a string containing the token data
-
Token
public Token(java.lang.String name, java.lang.String key)
Creates a token object from the given name and key.- Parameters:
name- the namekey- the key
-
-
Method Detail
-
encode
public java.lang.String encode()
Gets the encoded token string representation.- Returns:
- the token string
-
getAdditionalInfoKey
public java.lang.String getAdditionalInfoKey()
Gets the additional info key to use for this token.- Returns:
- the additional info key
-
getKey
public java.lang.String getKey()
Gets the key for this token.- Returns:
- the key
-
getName
public java.lang.String getName()
Gets the user name for this token.- Returns:
- the user name
-
isValid
public boolean isValid()
Checks if this token is valid.- Returns:
- true if this token is valid
-
-