Package org.beangle.security.monitor

Examples of org.beangle.security.monitor.AuthenticationException


  public Authentication authenticate(Authentication auth) throws AuthenticationException {
    logger.debug("Authentication using {}", getClass());
    SsoAuthentication ssoau = (SsoAuthentication) auth;
    String userName = doGetUserLoginName(ssoau.getRequest());
    if (StringUtils.isEmpty(userName)) {
      throw new AuthenticationException("sso user not found!");
    } else {
      auth.setPrincipal(userName);
      attachToUser(auth);
      return auth;
    }
View Full Code Here


              return new String((byte[]) context.getObjectAttribute("userPassword"));
            }
          });
    } catch (EntryNotFoundException e) {
      logger.info("cannot found {} in ldap", userName);
      throw new AuthenticationException("ldap user " + userName + " not found");
    }
    try {
      return (LdapPasswordHandler.getInstance().verify(ldapPassword, password));
    } catch (NoSuchAlgorithmException e) {
      throw new RuntimeException(e);
View Full Code Here

    OnlineActivity newOne = OnlineActivityBuilder.build(principal, authentication.getDetails(),
        sessionId, new Date());
    // 原先没有的要占座
    if (null == existed) {
      if (!profile.reserve())
        throw new AuthenticationException(Authentication.ERROR_OVERMAX);
    }
    // calculateOnline();
    sessionRegistry.register(sessionId, principal, newOne);
    // logger.debug("Register session {} for {}", sessionId, principal);
  }
View Full Code Here

  }

  public Authentication authenticate(Authentication auth) throws AuthenticationException {
    Iterator<AuthenticationProvider> iter = getProviders().iterator();
    Class<?> toTest = auth.getClass();
    AuthenticationException lastException = null;

    while (iter.hasNext()) {
      AuthenticationProvider provider = iter.next();
      if (!provider.supports(toTest)) {
        continue;
View Full Code Here

  }

  public User attachToUser(Authentication auth) {
    User user = userService.get((String) auth.getPrincipal());
    if (null == user) {
      throw new AuthenticationException(Authentication.ERROR_NOTEXIST);
    }
    if (!user.isEnabled()) {
      throw new AuthenticationException(Authentication.ERROR_UNACTIVE);
    }
    if (null == auth.getDetails()) {
      auth.setDetails(new UserDetails());
    }
    UserDetails details = (UserDetails) auth.getDetails();
View Full Code Here

  }

  public User attachToUser(Authentication auth) {
    User user = userService.get((String) auth.getPrincipal());
    if (null == user) {
      throw new AuthenticationException(Authentication.ERROR_NOTEXIST);
    }
    if (!user.isEnabled()) {
      throw new AuthenticationException(Authentication.ERROR_UNACTIVE);
    }
    if (null == auth.getDetails()) {
      auth.setDetails(new UserDetails());
    }
    UserDetails details = (UserDetails) auth.getDetails();
View Full Code Here

TOP

Related Classes of org.beangle.security.monitor.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.