Package org.dspace.eperson

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


        } // 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

        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

            {
                // 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

      // 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

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.