Examples of checkPassword()


Examples of databeans.User.checkPassword()

            // Look up the user login in.
            User user1 = userDAO.lookup(form.getEmailaddress());  
            if (user1 == null) {
              errors.add("The user does not exist!");
              return "homepage.jsp";
            }else if (!user1.checkPassword(form.getPassword())) {
              errors.add("Incorrect password");
              return "homepage.jsp";
            }
         
          /*
 
View Full Code Here

Examples of org.apache.karaf.jaas.modules.Encryption.checkPassword()

            boolean prefix = encryptionPrefix == null || encrypted.startsWith(encryptionPrefix);
            boolean suffix = encryptionSuffix == null || encrypted.endsWith(encryptionSuffix);
            if (prefix && suffix) {
                encrypted = encrypted.substring(encryptionPrefix != null ? encryptionPrefix.length() : 0, encrypted.length()
                        - (encryptionSuffix != null ? encryptionSuffix.length() : 0));
                return encryption.checkPassword(plain, encrypted);
            } else {
                return plain.equals(encrypted);
            }
        }
    }
View Full Code Here

Examples of org.atomojo.auth.service.db.User.checkPassword()

               User user = AuthResource.findUser(UserGuard.this.db,identifier);
               if (user==null) {
                  getContext().getLogger().info("No such user.");
                  return Verifier.RESULT_INVALID;
               }
               if (secret!=null && user.checkPassword(new String(secret))) {
                  getContext().getLogger().info("Authentication succeeded, checking permissions");
                  if (permission!=null) {
                     if (!user.hasPermission(permission)) {
                        getContext().getLogger().info("User does not have permission "+permission.getName()+","+permission.getUUID());
                        return Verifier.RESULT_INVALID;
View Full Code Here

Examples of org.atomojo.auth.service.db.User.checkPassword()

                        }
                     }
                  }
                  // lookup for admin
                  User adminUser = AuthResource.findUser(RealmUserGuard.this.db, identifier);
                  if (adminUser != null && adminUser.hasPermission(RealmUserGuard.this.adminPermission) && adminUser.checkPassword(new String(secret))) {
                     // we have an admin user so shortcut and return 1
                     request.getAttributes().put(AuthApplication.USER_ATTR, adminUser);
                     return Verifier.RESULT_VALID;
                  }
               } catch (SQLException ex) {
View Full Code Here

Examples of org.dspace.eperson.EPerson.checkPassword()

                log.warn(LogManager.getHeader(context, "authenticate", "rejecting PasswordAuthentication because "+username+" requires certificate."));
                return CERT_REQUIRED;
            }

            // login is ok if password matches:
            else if (eperson.checkPassword(password))
            {
                context.setCurrentUser(eperson);
                log.info(LogManager.getHeader(context, "authenticate", "type=PasswordAuthentication"));
                return SUCCESS;
            }
View Full Code Here

Examples of org.dspace.eperson.EPerson.checkPassword()

        } // now try to login user
        loggedUser = "anonymous";

        try {
            EPerson eUser = EPerson.findByEmail(context, user);
            if ((eUser.canLogIn()) && (eUser.checkPassword(pass))) {
                context.setCurrentUser(eUser);
                loggedUser = eUser.getName();
            } else {
                throw new EntityException("Bad username or password", user, 403);
            }
View Full Code Here

Examples of org.dspace.eperson.EPerson.checkPassword()

        try
        {
            context = new org.dspace.core.Context();
            EPerson dspaceUser = EPerson.findByEmail(context, user.getEmail());

            if ((dspaceUser == null) || (!dspaceUser.checkPassword(user.getPassword())))
            {
                token = null;
            }
            else if (tokens.containsKey(user.getEmail()))
            {
View Full Code Here

Examples of org.dspace.eperson.EPerson.checkPassword()

            {
                // this user can only login with x.509 certificate
                log.warn(LogManager.getHeader(context, "authenticate", "rejecting PasswordAuthentication because "+username+" requires certificate."));
                return CERT_REQUIRED;
            }
            else if (eperson.checkPassword(password))
            {
                // login is ok if password matches:
                context.setCurrentUser(eperson);
                log.info(LogManager.getHeader(context, "authenticate", "type=PasswordAuthentication"));
                return SUCCESS;
View Full Code Here

Examples of org.dspace.eperson.EPerson.checkPassword()

      // this user can only login with x.509 certificate
      log.error("Shibboleth-based password authentication failed for user "+username+" because the eperson object requires a certificate to authenticate..");
      return CERT_REQUIRED;
    }

    else if (eperson.checkPassword(password)) {
      // Password matched
      AuthenticationManager.initEPerson(context, request, eperson);
      context.setCurrentUser(eperson);
      log.info(eperson.getEmail()+" has been authenticated via shibboleth using password-based sword compatibility mode.");
      return SUCCESS;
View Full Code Here

Examples of org.jasypt.util.password.BasicPasswordEncryptor.checkPassword()

  }
 
  public static boolean checkPassword(String plainPassword, String encryptedPassword)
  {
    BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
    return (passwordEncryptor.checkPassword(plainPassword, encryptedPassword));
  }
}
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.