Class Token
- java.lang.Object
-
- com.tivoli.am.fim.trustserver.sts.oauth20.Token
-
public class Token extends java.lang.ObjectRepresents an OAuth Token
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTOKEN_CLIENT_IDstatic java.lang.StringTOKEN_DATE_CREATEDstatic java.lang.StringTOKEN_DATE_LAST_USEDstatic java.lang.StringTOKEN_ENABLEDstatic java.lang.StringTOKEN_IDstatic java.lang.StringToken_java_copyrightstatic java.lang.StringTOKEN_LIFETIMEstatic java.lang.StringTOKEN_REDIR_URIstatic java.lang.StringTOKEN_SCOPEstatic java.lang.StringTOKEN_STATE_IDstatic java.lang.StringTOKEN_SUB_TYPEstatic java.lang.StringTOKEN_TYPEstatic java.lang.StringTOKEN_USERNAME
-
Constructor Summary
Constructors Constructor Description Token(java.lang.String tokenId, java.lang.String type, java.lang.String subType, long createdAt, long lastUsedAt, int lifetime, java.lang.String scope, java.lang.String clientId, java.lang.String redirUri, java.lang.String username, java.lang.String stateId, java.lang.String enabled)Initialize this Token with the specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetClientId()Return the clientId of the authorization token.longgetDateCreated()Return the creation date of the token.longgetDateLastUsed()Return the date last used of the token.java.lang.StringgetId()Return the id of the token.intgetLifetime()Return the life time of the token in secondsjava.lang.StringgetRedirectUri()Return the redirectUri of the authorization token.java.lang.StringgetScope()Return the scope of the authorization token.java.lang.StringgetStateId()Return the StateId of the authorization token.java.lang.StringgetSubType()Return the sub-type of the token.java.lang.StringgetType()Return the type of the token.java.lang.StringgetUsername()Return the Username of the authorization token.booleanisEnabled()booleanisExpired()booleanupdateUsernameCase(java.lang.String username)Updates the Username's character case.
-
-
-
Field Detail
-
Token_java_copyright
public static final java.lang.String Token_java_copyright
-
TOKEN_ID
public static final java.lang.String TOKEN_ID
- See Also:
- Constant Field Values
-
TOKEN_TYPE
public static final java.lang.String TOKEN_TYPE
- See Also:
- Constant Field Values
-
TOKEN_SUB_TYPE
public static final java.lang.String TOKEN_SUB_TYPE
- See Also:
- Constant Field Values
-
TOKEN_DATE_CREATED
public static final java.lang.String TOKEN_DATE_CREATED
- See Also:
- Constant Field Values
-
TOKEN_DATE_LAST_USED
public static final java.lang.String TOKEN_DATE_LAST_USED
- See Also:
- Constant Field Values
-
TOKEN_LIFETIME
public static final java.lang.String TOKEN_LIFETIME
- See Also:
- Constant Field Values
-
TOKEN_SCOPE
public static final java.lang.String TOKEN_SCOPE
- See Also:
- Constant Field Values
-
TOKEN_USERNAME
public static final java.lang.String TOKEN_USERNAME
- See Also:
- Constant Field Values
-
TOKEN_CLIENT_ID
public static final java.lang.String TOKEN_CLIENT_ID
- See Also:
- Constant Field Values
-
TOKEN_REDIR_URI
public static final java.lang.String TOKEN_REDIR_URI
- See Also:
- Constant Field Values
-
TOKEN_STATE_ID
public static final java.lang.String TOKEN_STATE_ID
- See Also:
- Constant Field Values
-
TOKEN_ENABLED
public static final java.lang.String TOKEN_ENABLED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Token
public Token(java.lang.String tokenId, java.lang.String type, java.lang.String subType, long createdAt, long lastUsedAt, int lifetime, java.lang.String scope, java.lang.String clientId, java.lang.String redirUri, java.lang.String username, java.lang.String stateId, java.lang.String enabled)Initialize this Token with the specified parameters.- Parameters:
tokenId-type-subType-createdAt-lastUsedAt-lifetime-scope-
-
-
Method Detail
-
getId
public java.lang.String getId()
Return the id of the token. If hashed storage is enabled, this will be the hashed value of the token, with a prefix of the hash algorithm- Returns:
- The id of the token.
-
getType
public java.lang.String getType()
Return the type of the token.- Returns:
- The type of the token.
-
getSubType
public java.lang.String getSubType()
Return the sub-type of the token.- Returns:
- The sub-type of the token.
-
getDateCreated
public long getDateCreated()
Return the creation date of the token.- Returns:
- The creation date of the token in milliseconds.
-
getDateLastUsed
public long getDateLastUsed()
Return the date last used of the token.- Returns:
- The date last used for the token in milliseconds.
-
getLifetime
public int getLifetime()
Return the life time of the token in seconds- Returns:
- The life time of the token.
-
getScope
public java.lang.String getScope()
Return the scope of the authorization token.- Returns:
- The scope of the authorization token.
-
getClientId
public java.lang.String getClientId()
Return the clientId of the authorization token.- Returns:
- The clientId of the authorization token.
-
getRedirectUri
public java.lang.String getRedirectUri()
Return the redirectUri of the authorization token.- Returns:
- The redirectUri of the authorization token.
-
getUsername
public java.lang.String getUsername()
Return the Username of the authorization token.- Returns:
- The Username of the authorization token.
-
updateUsernameCase
public boolean updateUsernameCase(java.lang.String username)
Updates the Username's character case.- Returns:
- Whether the Username matched and was updated.
-
getStateId
public java.lang.String getStateId()
Return the StateId of the authorization token.- Returns:
- The StateId of the authorization token.
-
isEnabled
public boolean isEnabled()
-
isExpired
public boolean isExpired()
-
-