List of usage examples for org.springframework.security.authentication AccountStatusException AccountStatusException
public AccountStatusException(String msg, Throwable t)
From source file:org.apache.nifi.web.security.authorization.NiFiAuthorizationService.java
/** * Loads the user details for the specified dn. * * @param dn user dn/* www . ja v a 2s. c o m*/ * @return user detail */ private NiFiUserDetails getNiFiUserDetails(String dn) { try { NiFiUser user = userService.checkAuthorization(dn); return new NiFiUserDetails(user); } catch (AdministrationException ase) { throw new AuthenticationServiceException( String.format("An error occurred while accessing the user credentials for '%s': %s", dn, ase.getMessage()), ase); } catch (AccountDisabledException | AccountPendingException e) { throw new AccountStatusException(e.getMessage(), e) { }; } catch (AccountNotFoundException anfe) { throw new UsernameNotFoundException(anfe.getMessage()); } }