Class DefaultInviteUserTokenService

java.lang.Object
com.atlassian.crowd.service.token.DefaultInviteUserTokenService
All Implemented Interfaces:
InviteUserTokenService

@Transactional public class DefaultInviteUserTokenService extends Object implements InviteUserTokenService
Default implementation of InviteUserTokenService backed by a storage DAO.
Since:
v2.8
  • Constructor Details

    • DefaultInviteUserTokenService

      public DefaultInviteUserTokenService(com.atlassian.crowd.dao.token.ExpirableUserTokenDao expirableUserTokenDao, com.atlassian.security.random.SecureTokenGenerator tokenGenerator)
  • Method Details

    • createAndStoreToken

      public com.atlassian.crowd.model.token.ExpirableUserToken createAndStoreToken(String email, long directoryId, int tokenExpirySeconds) throws com.atlassian.crowd.exception.ObjectAlreadyExistsException
      Specified by:
      createAndStoreToken in interface InviteUserTokenService
      Throws:
      com.atlassian.crowd.exception.ObjectAlreadyExistsException
    • findByToken

      public Optional<com.atlassian.crowd.model.token.ExpirableUserToken> findByToken(String token)
      Specified by:
      findByToken in interface InviteUserTokenService
    • removeToken

      public boolean removeToken(String token)
      Specified by:
      removeToken in interface InviteUserTokenService
    • currentTime

      protected Instant currentTime()