Examples of InvalidLoginCredentialsException


Examples of com.adito.security.InvalidLoginCredentialsException

     *      java.lang.String)
     */
    public User logon(String username, String password) throws UserDatabaseException, InvalidLoginCredentialsException,
                    AccountLockedException {
        if (!checkPassword(username, password)) {
            throw new InvalidLoginCredentialsException();
        }
        try {
            return getAccount(username);
        } catch (Exception e) {
            throw new UserDatabaseException("Failed to get user account.", e);
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

            throw new UserDatabaseException("Could not get user account", e);
        }

        // Make sure the user exists
        if (user == null) {
            throw new InvalidLoginCredentialsException();
        }

        // Determine the password type
        String pw = new String(user.getPassword());
        try {
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

    }

    public void changePassword(String username, String oldPassword, String password, boolean forcePasswordChangeAtLogon)
                    throws UserDatabaseException, InvalidLoginCredentialsException {
        if (!supportsPasswordChange()) {
            throw new InvalidLoginCredentialsException("Database doesn't support password change.");
        }
        if (forcePasswordChangeAtLogon) {
            LOG.warn("Password change function of UNIX user database does not support forcePassswordChangeAtLogon.");
        }
        Process p = null;
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

        return user;
    }

    private void assertValidCredentials(ActiveDirectoryUser user, String password) throws InvalidLoginCredentialsException {
        if (!areCredentialsValid(user, password)) {
            throw new InvalidLoginCredentialsException("Invalid username or password.");
        }
    }
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

            }

            try {             
              // If there is no user in the scheme then it is an invalid login
              if(scheme.getUser() == null) {
                throw new InvalidLoginCredentialsException();
              }
             
              // Check the account is enabled and not locked
              if(!PolicyUtil.isEnabled(scheme.getUser())) {
                throw new AccountLockedException(scheme.getUsername(), "Account disabled.", true, 0);
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

    try {
      LoginContext context = new LoginContext(PAMUserDatabase.class.getName(), callback);
      context.login();
    }
    catch (LoginException e) {
      throw new InvalidLoginCredentialsException(e.getMessage());
    }
    return users.get(username);
  }
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

     * @throws AccountLockedException if locked
     */
    public static void checkLogin(User user) throws InvalidLoginCredentialsException, AccountLockedException {
        try {
            if (!canLogin(user)) {
                throw new InvalidLoginCredentialsException("You do not have permission to logon.");
            }
            if (!isEnabled(user)) {
                throw new AccountLockedException(user.getPrincipalName(), "Account locked. Please contact your administrator.",
                                true, 0);
            }
        } catch (InvalidLoginCredentialsException lce) {
            throw lce;
        } catch (AccountLockedException ale) {
            throw ale;
        } catch (Exception e) {
            log.error("Failed to test if logon for " + user.getPrincipalName() + " is allowed.", e);
            throw new InvalidLoginCredentialsException("You do not have permission to logon.");
        }
    }
View Full Code Here

Examples of com.adito.security.InvalidLoginCredentialsException

          ps.releasePreparedStatement();
        }
      } catch (SQLException e) {
      }
    }
    throw new InvalidLoginCredentialsException();
  }
View Full Code Here

Examples of com.sslexplorer.security.InvalidLoginCredentialsException

            } catch (Exception e) {
                throw new UserDatabaseException("Failed to get user account.", e);
            }
        }else{
            log.warn("RADIUS Validation FAILED!");
            throw new InvalidLoginCredentialsException("Bad username or password.");
           
        }
       
    }
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.