public interface InviteUserTokenService
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_TOKEN_EXPIRY_SECONDS |
| Modifier and Type | Method and Description |
|---|---|
ExpirableUserToken |
createAndStoreToken(String email,
long directoryId,
int tokenExpirySeconds)
Create a new token for the given email address and directory ID and store it
|
Optional<ExpirableUserToken> |
findByToken(String token)
Find the token using the given random hash
|
boolean |
removeToken(String token)
Removes the token with the given random hash
|
ExpirableUserToken createAndStoreToken(String email, long directoryId, int tokenExpirySeconds) throws ObjectAlreadyExistsException
email - the email address that the invitation was sent todirectoryId - the directory ID that the user will be created totokenExpirySeconds - number of seconds before generated token expires, or DEFAULT_TOKEN_EXPIRY_SECONDSObjectAlreadyExistsException - if a token already exists with the same random hash as the one that was generated.IllegalArgumentException - if tokenExpirySeconds is less than 0Optional<ExpirableUserToken> findByToken(String token)
token - random hash that was generated when the token was createdboolean removeToken(String token)
token - random hash that was generated when the token was createdCopyright © 2019 Atlassian. All rights reserved.