java.lang.Object
com.tivoli.am.fim.trustserver.sts.oauth20.Token

public class Token extends Object
Represents an OAuth Token
  • Field Details

  • Constructor Details

    • Token

      public Token(String tokenId, String type, String subType, long createdAt, long lastUsedAt, int lifetime, String scope, String clientId, String redirUri, String username, String stateId, String enabled)
      Initialize this Token with the specified parameters.
      Parameters:
      tokenId -
      type -
      subType -
      createdAt -
      lastUsedAt -
      lifetime -
      scope -
  • Method Details

    • getId

      public 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 String getType()
      Return the type of the token.
      Returns:
      The type of the token.
    • getSubType

      public 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 String getScope()
      Return the scope of the authorization token.
      Returns:
      The scope of the authorization token.
    • getClientId

      public String getClientId()
      Return the clientId of the authorization token.
      Returns:
      The clientId of the authorization token.
    • getRedirectUri

      public String getRedirectUri()
      Return the redirectUri of the authorization token.
      Returns:
      The redirectUri of the authorization token.
    • getUsername

      public String getUsername()
      Return the Username of the authorization token.
      Returns:
      The Username of the authorization token.
    • updateUsernameCase

      public boolean updateUsernameCase(String username)
      Updates the Username's character case.
      Returns:
      Whether the Username matched and was updated.
    • getStateId

      public String getStateId()
      Return the StateId of the authorization token.
      Returns:
      The StateId of the authorization token.
    • isEnabled

      public boolean isEnabled()
    • isExpired

      public boolean isExpired()