Project

General

Profile

Download (878 Bytes) Statistics
| Branch: | Tag: | Revision:
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.stereotype.Component;
12

    
13
import eu.etaxonomy.cdm.model.permission.User;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since Nov 3, 2021
18
 */
19
@Component
20
public class PasswordResetTokenStore extends AbstractRequestTokenStore<PasswordResetRequest, User> {
21

    
22
    @Override
23
    public PasswordResetRequest createNewToken(String userEmailAddress, User user, String randomToken, int tokenLifetimeMinutes) {
24
        PasswordResetRequest token = new PasswordResetRequest(user.getUsername(), userEmailAddress, randomToken, tokenLifetimeMinutes);
25
        return token;
26
    }
27
}
(7-7/7)