public class Token extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Token.Builder |
Modifier and Type | Field and Description |
---|---|
static long |
APPLICATION_TOKEN_DIRECTORY_ID
Tokens are used for application clients and principals.
|
Modifier | Constructor and Description |
---|---|
protected |
Token(Token other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Date |
getCreatedDate() |
long |
getDirectoryId()
Directory the
user originated, -1 if the token is for an
application . |
Long |
getId() |
String |
getIdentifierHash() |
long |
getLastAccessedTime()
Return the last accessed time.
|
TokenLifetime |
getLifetime() |
String |
getName()
Gets the name of the entity.
|
String |
getRandomHash()
Gets the token key.
|
long |
getRandomNumber() |
String |
getUnaliasedUsername() |
int |
hashCode() |
boolean |
isApplicationToken() |
boolean |
isUserToken() |
void |
setLastAccessedTime(long lastAccessedTime) |
String |
toString() |
public static final long APPLICATION_TOKEN_DIRECTORY_ID
APPLICATION_TOKEN_DIRECTORY_ID
value.protected Token(Token other)
other
- token to copypublic Long getId()
public String getRandomHash()
public String getName()
public String getUnaliasedUsername()
public long getDirectoryId()
user
originated, -1 if the token is for an
application
.directory
ID.public long getRandomNumber()
public boolean isUserToken()
public boolean isApplicationToken()
public Date getCreatedDate()
public long getLastAccessedTime()
lastAccessedTime
field being set then a
legacy value of lastAccessedDate
will be used instead.public void setLastAccessedTime(long lastAccessedTime)
public TokenLifetime getLifetime()
public String getIdentifierHash()
Copyright © 2018 Atlassian. All rights reserved.