Class AuthenticationToken

java.lang.Object
org.netxms.client.users.AuthenticationToken

public class AuthenticationToken extends Object
Authentication token information.
  • Constructor Details

    • AuthenticationToken

      public AuthenticationToken(NXCPMessage msg, long baseId)
      Create token information object from NXCP message.
      Parameters:
      msg - NXCP message
      baseId - base field ID
  • Method Details

    • getId

      public int getId()
      Returns:
      the id
    • getUserId

      public int getUserId()
      Returns:
      the userId
    • isPersistent

      public boolean isPersistent()
      Returns:
      the persistent
    • getDescription

      public String getDescription()
      Returns:
      the description
    • getValue

      public String getValue()
      Get token value. Server returns it only in response to the request that issued the token, so it is available on the object returned by NXCSession.requestAuthenticationToken and never on objects read from token listings. A lost token cannot be recovered and has to be revoked and re-issued.
      Returns:
      token value (null or empty string for tokens read from a listing)
    • getCreationTime

      public Date getCreationTime()
      Returns:
      the creationTime
    • getExpirationTime

      public Date getExpirationTime()
      Returns:
      the expirationTime
    • isSingleUse

      public boolean isSingleUse()
      Check if this token is single-use. Such token is destroyed by the login it authenticates and cannot be presented as REST bearer credential.
      Returns:
      true if this token is single-use