Package org.geoserver.security.password

Examples of org.geoserver.security.password.GeoServerPasswordEncoder.encodePassword()


        // validation ok, initializer encoder and set encoded password
        GeoServerPasswordEncoder enc =
                getSecurityManager().loadPasswordEncoder(getPasswordEncoderName());

        enc.initializeFor(this);
        user.setPassword(enc.encodePassword(user.getPassword(), null));
       
    }
   
    /* (non-Javadoc)
     * @see org.geoserver.security.GeoserverUserGroupStore#addUser(org.geoserver.security.impl.GeoserverUser)
View Full Code Here


        // validation ok, initializer encoder and set encoded password
        GeoServerPasswordEncoder enc =
                getSecurityManager().loadPasswordEncoder(getPasswordEncoderName());

        enc.initializeFor(this);
        user.setPassword(enc.encodePassword(user.getPassword(), null));
       
    }
   
   
    /* (non-Javadoc)
 
View Full Code Here

           
            String rawPassword = null;
            String encPassword = null;
            try {
                rawPassword = mEncoder.decode(user.getPassword());
                encPassword= encoder.encodePassword(rawPassword, null);
            } catch (UnsupportedOperationException ex) {
                LOGGER.warning("Cannot recode user: "+user.getUsername()+" password: "+user.getPassword());
                encPassword=user.getPassword();               
            }
            GeoServerUser newUser = store.createUserObject(user.getUsername(),encPassword, user.isEnabled());
View Full Code Here

            if (encoder.isResponsibleForEncoding(user.getPassword()))
                continue; // nothing to do
            try {
                String rawpass= mEncoder.decode(user.getPassword());
                // to avoid password policy exceptions, recode explicitly
                String encPass=encoder.encodePassword(rawpass, null);
                user.setPassword(encPass);
                try {
                    store.updateUser(user);
                } catch (PasswordPolicyException e) {
                    store.load()// rollback
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.