Package org.olat.ldap

Examples of org.olat.ldap.LDAPError


        // Form data is ok
        // verify old password
        String oldPwd = chPwdForm.getOldPasswordValue();
        Identity provenIdent = null;
        if(ManagerFactory.getManager().findAuthentication(ureq.getIdentity(), LDAPAuthenticationController.PROVIDER_LDAP) != null) {
          LDAPError ldapError = new LDAPError();
          //fallback to OLAT if enabled happen automatically in LDAPAuthenticationController
          provenIdent = LDAPAuthenticationController.authenticate(ureq.getIdentity().getName(), oldPwd, ldapError);
        }
        else if(ManagerFactory.getManager().findAuthentication(ureq.getIdentity(), OLATAuthenticationController.PROVIDER_OLAT) != null) {
          provenIdent = OLATAuthenticationController.authenticate(ureq.getIdentity().getName(), oldPwd);
View Full Code Here


    boolean allOk = false;
   
    Authentication ldapAuth = ManagerFactory.getManager().findAuthentication(identity, LDAPAuthenticationController.PROVIDER_LDAP);
    if(ldapAuth != null) {
      if(LDAPLoginModule.isPropagatePasswordChangedOnLdapServer()) {
        LDAPError ldapError = new LDAPError();
        LDAPLoginManager.getInstance().changePassword(identity, newPwd, ldapError);
        log.audit(doer.getName() + " change the password on the LDAP server for identity: " + identity.getName());
        allOk = ldapError.isEmpty();

        if(allOk && LDAPLoginModule.isCacheLDAPPwdAsOLATPwdOnLogin()) {
          allOk &= changeOlatPassword(doer, identity, hashedPwd);
        }
      }
View Full Code Here

      // Disable start link during sync
      syncStartLink.setEnabled(false);
      // Run sync task as background task to not block the user GUI
      Runnable batchSyncTask = new Runnable() {
        public void run() {
          LDAPError errors = new LDAPError();
          boolean success = LDAPLoginManager.getInstance().doBatchSync(errors);
          // notify controller and finish thread
          syncTaskFinished(success, errors);
        }       
      };
View Full Code Here

    loginForm = null;
  }
 
  @Override
  protected void event(UserRequest ureq, Component source, Event event) {
    LDAPError ldapError = new LDAPError();
    if (source == loginForm){
      if (event == Form.EVNT_VALIDATION_OK) {
        String login = loginForm.getLogin();
        String pass = loginForm.getPass();
        authenticatedIdentity= authenticate(login, pass, ldapError);
        if (authenticatedIdentity != null) {
          provider = LDAPAuthenticationController.PROVIDER_LDAP;
        } else {
          // try fallback to OLAT provider if configured
          if (LDAPLoginModule.isCacheLDAPPwdAsOLATPwdOnLogin()) {
            authenticatedIdentity = OLATAuthenticationController.authenticate(login, pass);
          }
          if (authenticatedIdentity != null) {
            provider = OLATAuthenticationController.PROVIDER_OLAT;
          }
        }
        // Still not found? register for hacking attempts
        if (authenticatedIdentity == null) {
          if (LoginModule.registerFailedLoginAttempt(login)) {
            logAudit("Too many failed login attempts for " + login + ". Login blocked.", null);
            getWindowControl().setError(translate("login.blocked", LoginModule.getAttackPreventionTimeoutMin().toString()));
            return;
          } else {
            getWindowControl().setError(translate("login.error", ldapError.get()));
            return;
          }
        }
        LoginModule.clearFailedLoginAttempts(login);
        // Check if disclaimer has been accepted
View Full Code Here

TOP

Related Classes of org.olat.ldap.LDAPError

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.