Package org.springframework.security.crypto.password

Examples of org.springframework.security.crypto.password.PasswordEncoder.matches()


    }

    private boolean verifyPassword(String username, String presentedPassword,
            String encodedPassword) {
        PasswordEncoder passwordEncoder = new StandardPasswordEncoder(username);
        if (passwordEncoder.matches(presentedPassword, encodedPassword)) {
            return true;
        } else {
            return false;
        }
    }
View Full Code Here


                        throw new CapMessageException(CapAppContext.getMessage(
                                "error.005", new Object[] { changeInteval }),
                                getClass());
                    }
                }
                if (passwordEncoder.matches(password, h.getPassword())) {
                    throw new CapMessageException(CapAppContext.getMessage(
                            "error.003", new Object[] { maxHistory }),
                            getClass());
                }
                i++;
View Full Code Here

    @Override
    public boolean validatePassword(String userId, String password) {
        User user = userDao.findByCode(userId);
        PasswordEncoder passwordEncoder = new StandardPasswordEncoder(userId);
        return passwordEncoder.matches(password, user.getPassword());
    }

    @Override
    public void changeUserPassword(String userId, String password) {
        SysParm parmPwdExpiredDay = commonDao.findById(SysParm.class,
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.