1
|
/**
|
2
|
* Copyright (C) 2021 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.security;
|
10
|
|
11
|
import org.springframework.beans.factory.annotation.Autowired;
|
12
|
import org.springframework.stereotype.Component;
|
13
|
|
14
|
import eu.etaxonomy.cdm.api.service.IUserService;
|
15
|
|
16
|
/**
|
17
|
* @author a.kohlbecker
|
18
|
* @since Nov 3, 2021
|
19
|
*/
|
20
|
@Component
|
21
|
public class AccountCreationRequestTokenStore extends AbstractRequestTokenStore<AccountCreationRequest, Object> {
|
22
|
|
23
|
@Autowired
|
24
|
private IUserService userService;
|
25
|
|
26
|
@Override
|
27
|
public AccountCreationRequest createNewToken(String userEmailAddress, Object unused, String randomToken, int tokenLifetimeMinutes) {
|
28
|
AccountCreationRequest token = new AccountCreationRequest(userEmailAddress, randomToken, tokenLifetimeMinutes);
|
29
|
return token;
|
30
|
}
|
31
|
|
32
|
}
|