Examples of DisabledException


Examples of org.springframework.security.authentication.DisabledException

        User user = userDetailsDao.findByEmail(userName);
        if (user == null) {
            throw new UsernameNotFoundException("User not found for userName: " + userName);
        } else {
            if (!user.isEnabled()) {
                throw new DisabledException("User is disabled");
            }
            userService.setDefaultActiveOrganization(user);
            return user;
        }
    }
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

    if (person == null) {
      throw new UsernameNotFoundException("User not found for: " + token.getPrincipal());
    }
   
    if (!person.isActive()) {
      throw new DisabledException("User is disabled");
    }
   
    Set<GrantedAuthority> grantedAuthorities = new HashSet<GrantedAuthority>();
   
    addAuthorities(grantedAuthorities, person.getAuthorities());
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        } else {
            user = userDAO.find(username);

            if (user != null) {
                if (user.isSuspended() != null && user.isSuspended()) {
                    throw new DisabledException("User " + user.getUsername() + " is suspended");
                }

                CAttr authStatuses = confDAO.find("authentication.statuses");
                if (authStatuses != null && !authStatuses.getValuesAsStrings().contains(user.getStatus())) {
                    throw new DisabledException("User " + user.getUsername() + " not allowed to authenticate");
                }

                authenticated = authenticate(user, authentication.getCredentials().toString());

                updateLoginAttributes(user, authenticated);
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

        if (userGroupServiceName!=null) {
            try {
                GeoServerUserGroupService service = getSecurityManager().loadUserGroupService(userGroupServiceName);
                details = service.loadUserByUsername(user);               
                if (details.isEnabled()==false) {
                    log (new DisabledException("User "+user+" is disabled"));
                    return null;
                }
            } catch (IOException ex ) {
                log(new AuthenticationServiceException(ex.getLocalizedMessage(),ex));
                return null;
View Full Code Here

Examples of org.springframework.security.authentication.DisabledException

    }

    if (!user.isEnabled()) {
      log.debug("User account is disabled");

      throw new DisabledException(messages.getMessage("AbstractUserDetailsAuthenticationProvider.disabled",
        "User is disabled"));
    }

    if (!user.isAccountNonExpired()) {
      log.debug("User account is expired");
View Full Code Here

Examples of robocode.exception.DisabledException

      final int res = setCallCount.incrementAndGet();

      if (res >= MAX_SET_CALL_COUNT) {
        isDisabled = true;
        println("SYSTEM: You have made " + res + " calls to setXX methods without calling execute()");
        throw new DisabledException("Too many calls to setXX methods");
      }
    }
  }
View Full Code Here

Examples of robocode.exception.DisabledException

      final int res = getCallCount.incrementAndGet();

      if (res >= MAX_GET_CALL_COUNT) {
        isDisabled = true;
        println("SYSTEM: You have made " + res + " calls to getXX methods without calling execute()");
        throw new DisabledException("Too many calls to getXX methods");
      }
    }
  }
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.