Package com.atlassian.crowd.model.token
Class InternalExpirableUserToken
java.lang.Object
com.atlassian.crowd.model.token.InternalExpirableUserToken
- All Implemented Interfaces:
ExpirableUserToken
,Serializable
public final class InternalExpirableUserToken
extends Object
implements Serializable, ExpirableUserToken
Represent a token that can expire for a user
- Since:
- v2.8
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic InternalExpirableUserToken
createChangeEmailToken
(String token, String username, String newEmailAddress, long expiryDate, long directoryId) static InternalExpirableUserToken
createInviteUserToken
(String token, String email, long expiryDate, long directoryId) static InternalExpirableUserToken
createResetPasswordToken
(String token, String username, String email, long expiryDate, long directoryId) boolean
long
The ID of the directory associated with the token.An email address that can be associated with the token.long
The date at which the token expires, in millis since the epoch.long
getId()
getToken()
A unique token.getType()
Type of the token, specifying with what feature in Crowd a given token is associated.A username that can be associated with the token.int
hashCode()
void
-
Method Details
-
createResetPasswordToken
public static InternalExpirableUserToken createResetPasswordToken(String token, String username, String email, long expiryDate, long directoryId) -
createInviteUserToken
public static InternalExpirableUserToken createInviteUserToken(String token, String email, long expiryDate, long directoryId) -
createChangeEmailToken
public static InternalExpirableUserToken createChangeEmailToken(String token, String username, String newEmailAddress, long expiryDate, long directoryId) -
getId
public long getId() -
getToken
Description copied from interface:ExpirableUserToken
A unique token.- Specified by:
getToken
in interfaceExpirableUserToken
- Returns:
- the token
-
getUsername
Description copied from interface:ExpirableUserToken
A username that can be associated with the token.- Specified by:
getUsername
in interfaceExpirableUserToken
- Returns:
- a username or null
-
getEmailAddress
Description copied from interface:ExpirableUserToken
An email address that can be associated with the token.- Specified by:
getEmailAddress
in interfaceExpirableUserToken
- Returns:
- an email address or null
-
getExpiryDate
public long getExpiryDate()Description copied from interface:ExpirableUserToken
The date at which the token expires, in millis since the epoch.- Specified by:
getExpiryDate
in interfaceExpirableUserToken
- Returns:
- a date
-
getDirectoryId
public long getDirectoryId()Description copied from interface:ExpirableUserToken
The ID of the directory associated with the token. This can be used, for instance, to know in which directory to create an invited user.- Specified by:
getDirectoryId
in interfaceExpirableUserToken
- Returns:
- the ID of the directory associated with the token
-
getType
Description copied from interface:ExpirableUserToken
Type of the token, specifying with what feature in Crowd a given token is associated.- Specified by:
getType
in interfaceExpirableUserToken
-
setType
-
equals
-
hashCode
public int hashCode()
-