Package org.acegisecurity.providers.ldap

Examples of org.acegisecurity.providers.ldap.LdapShaPasswordEncoder.encodePassword()


     * supported by the JVM.
     */
    public void setSecret(String person_id, String question_in, String secret_in)
            throws SystemUnavailableException, UniFileException, UniSessionException {
        LdapShaPasswordEncoder pwd = new LdapShaPasswordEncoder();
        String secret_hash = pwd.encodePassword(secret_in.toUpperCase(), null);
        local_params.setId(person_id);
        local_params.question.set(question_in);
        local_params.answer.set(secret_hash);
    }

View Full Code Here


            // set password is a ldap modify operation
            ModificationItem[] mods = new ModificationItem[2];

            LdapShaPasswordEncoder pwd = new LdapShaPasswordEncoder();
            String passwd_hash = pwd.encodePassword(new_passwd, salt);

            Attribute passwd = new BasicAttribute("userPassword", passwd_hash);
            mods[0] = new ModificationItem(DirContext.REPLACE_ATTRIBUTE, passwd);

            Attribute slchanged = new BasicAttribute("shadowLastChange", ts);
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.