Package org.springframework.security.crypto.password

Examples of org.springframework.security.crypto.password.StandardPasswordEncoder.encode()


    public String validateRegistration(String key) {
        log.debug("Validating registration for key {}", key);
        String login = registrationRepository.getLoginByRegistrationKey(key);
        String password = RandomUtil.generatePassword();
        StandardPasswordEncoder encoder = new StandardPasswordEncoder();
        String encryptedPassword = encoder.encode(password);
        if (login != null) {
            User existingUser = getUserByLogin(login);
            if (existingUser != null) {
                log.debug("Reinitializing password for user {}", login);
                existingUser.setPassword(encryptedPassword);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.