Examples of checkPassword()


Examples of com.adito.security.UserDatabase.checkPassword()

    public ActionForward commit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        PromptForPrivateKeyPassphraseForm f = (PromptForPrivateKeyPassphraseForm) form;
        SessionInfo session = getSessionInfo(request);
        UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(session.getUser().getRealm());
        if(!udb.checkPassword(session.getUser().getPrincipalName(),
            f.getPassphrase())) {
          // User has entered incorrect passphrase - go back
          ActionErrors errs = new ActionErrors();
            errs.add(Globals.ERROR_KEY, new ActionMessage("promptForPrivateKeyPassphrase.error.incorrectPassphrase"));
            saveErrors(request.getSession(), errs);
View Full Code Here

Examples of com.adito.security.UserDatabase.checkPassword()

        AuthenticationScheme scheme = (AuthenticationScheme) getSessionInfo(request).getHttpSession().getAttribute(Constants.AUTH_SESSION);
        try {
            SessionInfo session = getSessionInfo(request);
            UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(session.getUser().getRealm());
            String username = session.getUser().getPrincipalName();
            if (!udb.checkPassword(username, pfspf.getPassword())) {
                throw new Exception("Incorrect password.");
            }
            scheme.addCredentials(new PasswordCredentials(username, pfspf.getPassword().toCharArray()));
            request.setAttribute(Constants.REQ_ATTR_FORWARD_TO, ((PromptForSessionPasswordForm)form).getForwardTo());
            request.setAttribute(Constants.REQ_ATTR_TARGET, ((PromptForSessionPasswordForm)form).getTarget());
View Full Code Here

Examples of com.adito.security.UserDatabase.checkPassword()

                throw new FieldValidationException("newAndConfirmPasswordsDontMatch");
            }
            if (getNewPassword().length() == 0) {
                throw new FieldValidationException("noNewPassword");
            }
            if (!udb.checkPassword(user.getPrincipalName(), getOldPassword())) {
                throw new FieldValidationException("oldPasswordIncorrect");
            } else {
                // Check that the password matches the current policy, if not
                // then request a new one
                try {
View Full Code Here

Examples of com.adito.security.UserDatabase.checkPassword()

            String username = realmName == null ? realmAndUsername : getAfter(realmAndUsername, "/");
            String password = getAfter(credentials, ":");

            try {
                UserDatabase userDatabase = getUserDatabase(realmName);
                if (userDatabase.checkPassword(username, password)) {
                    return userDatabase.getAccount(username);
                }
            } catch (InvalidLoginCredentialsException e) {
                logger.info("Authentication failed for user " + username);
            } catch (Exception e) {
View Full Code Here

Examples of com.nabalive.data.core.model.User.checkPassword()

                    @Override
                    public void handle(Request request, Response response, Map<String, String> map) throws Exception {
                        String email = checkNotNull(request.getParam("email")).toLowerCase();
                        String password = checkNotNull(request.getParam("password"));
                        User user = checkNotNull(userDAO.findOne("email", email));
                        user.checkPassword(password);

                        Token token = new Token();
                        token.setUserId(user.getId());

//                        Map result = new HashMap();
View Full Code Here

Examples of com.omnicarecr.accounts.util.UserInfo.checkPassword()

        }
   
    boolean valid=false;
   
    // look me up out out of that file and make sure uid is still 28272
    valid = userinfo.checkPassword(PASSWORD_LEN_PASS);
    assertTrue(valid == true);

    // look me up out out of that file and make sure uid is still 28272   
    //valid = userinfo.checkUserIdLen(USER_ID_LEN_FAIL); 
    //assertTrue(valid = false);
View Full Code Here

Examples of com.omnicarecr.accounts.util.UserInfo.checkPassword()

        }
   
    boolean valid=true;
   
    // look me up out out of that file and make sure uid is still 28272
    valid = userinfo.checkPassword(PASSWORD_LEN_FAIL);
    assertTrue(valid == false);

    // look me up out out of that file and make sure uid is still 28272   
    //valid = userinfo.checkUserIdLen(USER_ID_LEN_FAIL); 
    //assertTrue(valid = false);
View Full Code Here

Examples of com.omnicarecr.accounts.util.UserInfo.checkPassword()

        }
   
    boolean valid=true;
   
    // look me up out out of that file and make sure uid is still 28272
    valid = userinfo.checkPassword(PASSWORD_CHARS_FAIL);
    assertTrue(valid == false);

    // look me up out out of that file and make sure uid is still 28272   
    //valid = userinfo.checkUserIdLen(USER_ID_LEN_FAIL); 
    //assertTrue(valid = false);
View Full Code Here

Examples of com.omnicarecr.accounts.util.UserInfo.checkPassword()

        }
   
    boolean valid=false;
   
    // look me up out out of that file and make sure uid is still 28272
    valid = userinfo.checkPassword(PASSWORD_CHARS_PASS);
    assertTrue(valid == true);

    // look me up out out of that file and make sure uid is still 28272   
    //valid = userinfo.checkUserIdLen(USER_ID_LEN_FAIL); 
    //assertTrue(valid = false);
View Full Code Here

Examples of com.opengamma.security.user.User.checkPassword()

    // Update
    user.setPassword("modifiedtestpw");
    _userManager.updateUser(user);
    user = _userManager.getUser("testuser");
    assertNotNull(user);
    assertTrue(user.checkPassword("modifiedtestpw"));
   
    // Delete
    _userManager.deleteUser(user);
    user = _userManager.getUser("testuser");
    assertNull(user);
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.