Class Token
- java.lang.Object
-
- com.tivoli.am.fim.trustserver.sts.oauth20.Token
-
public class Token extends java.lang.Object
Represents an OAuth Token
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
TOKEN_CLIENT_ID
static java.lang.String
TOKEN_DATE_CREATED
static java.lang.String
TOKEN_DATE_LAST_USED
static java.lang.String
TOKEN_ENABLED
static java.lang.String
TOKEN_ID
static java.lang.String
Token_java_copyright
static java.lang.String
TOKEN_LIFETIME
static java.lang.String
TOKEN_REDIR_URI
static java.lang.String
TOKEN_SCOPE
static java.lang.String
TOKEN_STATE_ID
static java.lang.String
TOKEN_SUB_TYPE
static java.lang.String
TOKEN_TYPE
static java.lang.String
TOKEN_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.String
getClientId()
Return the clientId of the authorization token.long
getDateCreated()
Return the creation date of the token.long
getDateLastUsed()
Return the date last used of the token.java.lang.String
getId()
Return the id of the token.int
getLifetime()
Return the life time of the token in secondsjava.lang.String
getRedirectUri()
Return the redirectUri of the authorization token.java.lang.String
getScope()
Return the scope of the authorization token.java.lang.String
getStateId()
Return the StateId of the authorization token.java.lang.String
getSubType()
Return the sub-type of the token.java.lang.String
getType()
Return the type of the token.java.lang.String
getUsername()
Return the Username of the authorization token.boolean
isEnabled()
boolean
isExpired()
boolean
updateUsernameCase(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()
-
-