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 InternalExpirableUserTokencreateChangeEmailToken(String token, String username, String newEmailAddress, long expiryDate, long directoryId) static InternalExpirableUserTokencreateInviteUserToken(String token, String email, long expiryDate, long directoryId) static InternalExpirableUserTokencreateResetPasswordToken(String token, String username, String email, long expiryDate, long directoryId) booleanlongThe ID of the directory associated with the token.An email address that can be associated with the token.longThe date at which the token expires, in millis since the epoch.longgetId()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.inthashCode()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:ExpirableUserTokenA unique token.- Specified by:
getTokenin interfaceExpirableUserToken- Returns:
- the token
-
getUsername
Description copied from interface:ExpirableUserTokenA username that can be associated with the token.- Specified by:
getUsernamein interfaceExpirableUserToken- Returns:
- a username or null
-
getEmailAddress
Description copied from interface:ExpirableUserTokenAn email address that can be associated with the token.- Specified by:
getEmailAddressin interfaceExpirableUserToken- Returns:
- an email address or null
-
getExpiryDate
public long getExpiryDate()Description copied from interface:ExpirableUserTokenThe date at which the token expires, in millis since the epoch.- Specified by:
getExpiryDatein interfaceExpirableUserToken- Returns:
- a date
-
getDirectoryId
public long getDirectoryId()Description copied from interface:ExpirableUserTokenThe 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:
getDirectoryIdin interfaceExpirableUserToken- Returns:
- the ID of the directory associated with the token
-
getType
Description copied from interface:ExpirableUserTokenType of the token, specifying with what feature in Crowd a given token is associated.- Specified by:
getTypein interfaceExpirableUserToken
-
setType
-
equals
-
hashCode
public int hashCode()
-