Package com.liferay.portal.auth

Examples of com.liferay.portal.auth.Authenticator


          if ((PRE_AUTHENTICATOR != null) &&
            (0 < PRE_AUTHENTICATOR.length()) &&
            PRE_AUTHENTICATOR.equals(Config.getStringProperty("LDAP_FRONTEND_AUTH_IMPLEMENTATION"))) {
            Class ldap_auth_impl_class = Class.forName(Config.getStringProperty("LDAP_FRONTEND_AUTH_IMPLEMENTATION"));
            Authenticator ldap_auth_impl = (Authenticator) ldap_auth_impl_class.newInstance();
            int auth = 0;

          if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
            auth = ldap_auth_impl.authenticateByEmailAddress(comp.getCompanyId(), userName, password);
        } else {
          auth = ldap_auth_impl.authenticateByUserId(comp.getCompanyId(), userName, password);
        }

          if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
                user = APILocator.getUserAPI().loadByUserByEmail(userName, APILocator.getUserAPI().getSystemUser(), false);
              } else {
View Full Code Here


          if ((PRE_AUTHENTICATOR != null) &&
            (0 < PRE_AUTHENTICATOR.length()) &&
            PRE_AUTHENTICATOR.equals(Config.getStringProperty("LDAP_FRONTEND_AUTH_IMPLEMENTATION"))) {
            Class ldap_auth_impl_class = Class.forName(Config.getStringProperty("LDAP_FRONTEND_AUTH_IMPLEMENTATION"));
            Authenticator ldap_auth_impl = (Authenticator) ldap_auth_impl_class.newInstance();
            int auth = 0;

          if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
            auth = ldap_auth_impl.authenticateByEmailAddress(comp.getCompanyId(), userName, password);
         } else {
           auth = ldap_auth_impl.authenticateByUserId(comp.getCompanyId(), userName, password);
         }

          if (comp.getAuthType().equals(Company.AUTH_TYPE_EA)) {
                 user = APILocator.getUserAPI().loadByUserByEmail(userName, APILocator.getUserAPI().getSystemUser(), false);
               } else {
View Full Code Here

    if (comp.getAuthType().equals(Company.AUTH_TYPE_ID)) {
      useEmailAsLogin = false;
    }
    try {
      if (PRE_AUTHENTICATOR != null && !PRE_AUTHENTICATOR.equals("")) {
        Authenticator authenticator;
        authenticator = (Authenticator) new com.dotcms.repackage.bsh.Interpreter().eval("new " + PRE_AUTHENTICATOR + "()");
        if (useEmailAsLogin) {
          authenticator.authenticateByEmailAddress(comp.getCompanyId(), username, passwd);
        } else {
          authenticator.authenticateByUserId(comp.getCompanyId(), username, passwd);
        }
      }
    }catch (AuthException ae) {
      Logger.debug(this, "Username : " + username + " failed to login", ae);
      throw new DotSecurityException(ae.getMessage(),ae);
View Full Code Here

TOP

Related Classes of com.liferay.portal.auth.Authenticator

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.