Package org.netxms.client.users
Class AuthenticationToken
java.lang.Object
org.netxms.client.users.AuthenticationToken
Authentication token information.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationToken(NXCPMessage msg, long baseId) Create token information object from NXCP message. -
Method Summary
-
Constructor Details
-
AuthenticationToken
Create token information object from NXCP message.- Parameters:
msg- NXCP messagebaseId- 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
- Returns:
- the description
-
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
- Returns:
- the creationTime
-
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
-