Package org.geoserver.security.password

Examples of org.geoserver.security.password.MasterPasswordChangeRequest


            //new password comes from the provider
            newPasswd = mpProvider.getMasterPassword();
        }

        //first validate the password change
        MasterPasswordChangeRequest req = new MasterPasswordChangeRequest();
        req.setCurrentPassword(currPasswd);
        req.setNewPassword(newPasswd);
        req.setConfirmPassword(newPasswdConfirm);

        MasterPasswordChangeValidator val = new MasterPasswordChangeValidator(this);
        val.validateChangeRequest(req);

        //validate the new config
View Full Code Here


    }

    @Test
    public void testValidator() throws Exception{
        // test spring
        MasterPasswordChangeRequest r = new MasterPasswordChangeRequest();
       
        checkCurrentPassword(r);
        r.setCurrentPassword("geoserver".toCharArray());
        //r.setCurrentPassword(getMasterPassword().toCharArray());
       
        checkConfirmationPassword(r);
        r.setConfirmPassword("abc".toCharArray());
       
        checkNewPassword(r);
        r.setNewPassword("def".toCharArray());
       
        checkConfirmationEqualsNewPassword(r);
        r.setNewPassword("abc".toCharArray());  
       
        validateAgainstPolicy(r);
       
        r.setConfirmPassword(r.getCurrentPassword());
        r.setNewPassword(r.getCurrentPassword());
       
        checkCurrentEqualsNewPassword(r);
        r.setConfirmPassword((new String(r.getCurrentPassword())+"1").toCharArray());
        r.setNewPassword((new String(r.getCurrentPassword())+"1").toCharArray());

        validator.validateChangeRequest(r);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.security.password.MasterPasswordChangeRequest

Copyright © 2018 www.massapicom. 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.