Package org.sonatype.security.authentication

Examples of org.sonatype.security.authentication.AuthenticationException


      this.authenticateUser(user, password, testLdapConnector, ldapServer);
      return user;

    }
    catch (LdapDAOException e) {
      throw new AuthenticationException("Server: " + ldapServer.getName() + ", could not be accessed: "
          + e.getMessage(), e);
    }
  }
View Full Code Here


          }
        }
      }
    }
    catch (LdapDAOException e) {
      throw new AuthenticationException("User: " + userId + " could not be authenticated.", e);
    }

    throw new AuthenticationException("User: " + userId + " could not be authenticated.");
  }
View Full Code Here

  }

  public void authenticateUserWithPassword(LdapUser ldapUser, String password) throws AuthenticationException {
    // use the passwordmanager
    if (!this.passwordManager.isPasswordValid(ldapUser.getPassword(), password, null)) {
      throw new AuthenticationException("User '" + ldapUser.getUsername() + "' cannot be authenticated.");
    }
  }
View Full Code Here

    LdapContext ctx = null;
    try {
      ctx = ldapContextFactory.getLdapContext(user, pass);
    }
    catch (javax.naming.AuthenticationException e) {
      throw new AuthenticationException("User '" + user + "' cannot be authenticated.", e);
    }
    catch (NamingException e) {
      throw new AuthenticationException("User '" + user + "' cannot be authenticated.", e);
    }
    finally {
      LdapUtils.closeContext(ctx);
    }
  }
View Full Code Here

      Subject subject = this.getSubject();
      subject.login(token);
      return subject;
    }
    catch (org.apache.shiro.authc.AuthenticationException e) {
      throw new AuthenticationException(e.getMessage(), e);
    }
  }
View Full Code Here

  {
    try {
      return this.getSecurityManager().authenticate(token);
    }
    catch (org.apache.shiro.authc.AuthenticationException e) {
      throw new AuthenticationException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.sonatype.security.authentication.AuthenticationException

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.