Package org.acegisecurity

Examples of org.acegisecurity.AuthenticationServiceException


    if (authentication instanceof CustomUsernamePasswordAuthenticationToken) {
      try {
        loadedUser = ((CustomJdbcDaoImpl) this.getUserDetailsService())
            .loadUserByCaid(authentication.getName());
      } catch (DataAccessException repositoryProblem) {
        throw new AuthenticationServiceException(repositoryProblem.getMessage(), repositoryProblem);
      }

      if (loadedUser == null) {
        throw new AuthenticationServiceException("AuthenticationDao returned null, which is an interface contract violation");
      }
    } else {
      loadedUser = this.retrieveUser(username, authentication);
    }
    return loadedUser;
View Full Code Here


                    return;
                }

                if (user == null) {
                    throw new AuthenticationServiceException(
                            "AuthenticationDao returned null, which is an interface contract violation");
                }

                userCache.putUserInCache(user);
            }
View Full Code Here

        UserDetails loadedUser;

        try {
            loadedUser = this.getUserDetailsService().loadUserByUsername(username);
        } catch (DataAccessException repositoryProblem) {
            throw new AuthenticationServiceException(repositoryProblem.getMessage(), repositoryProblem);
        }

        if (loadedUser == null) {
            throw new AuthenticationServiceException(
                    "UserDetailsService returned null, which is an interface contract violation");
        }

        return loadedUser;
    }
View Full Code Here

            LdapUserDetails ldapUser = getAuthenticator().authenticate(username, password);

            return createUserDetails(ldapUser, username, password);

        } catch (DataAccessException ldapAccessFailure) {
            throw new AuthenticationServiceException(ldapAccessFailure.getMessage(), ldapAccessFailure);
        }
    }
View Full Code Here

*/
public class DefaultLoginExceptionResolver implements LoginExceptionResolver {
    //~ Methods ========================================================================================================

    public AcegiSecurityException resolveException(LoginException e) {
        return new AuthenticationServiceException(e.getMessage(), e);
    }
View Full Code Here

        String userName = match.group(1);

        UserDetails user = this.userDetailsService.loadUserByUsername(userName);

        if (user == null) {
            throw new AuthenticationServiceException(
                "UserDetailsService returned null, which is an interface contract violation");
        }

        return user;
    }
View Full Code Here

        try {
            Method reflectionMethod = user.getClass().getMethod(this.userPropertyToUse, new Class[] {});

            return reflectionMethod.invoke(user, new Object[] {});
        } catch (Exception exception) {
            throw new AuthenticationServiceException(exception.getMessage(), exception);
        }
    }
View Full Code Here

    try {
      loadedUser = this.getUserDetailsService().loadUserByUsername(username);
    }
    catch (DataAccessException repositoryProblem) {
      throw new AuthenticationServiceException(repositoryProblem.getMessage(), repositoryProblem);
    }

    if (loadedUser == null) {
      throw new AuthenticationServiceException(
          "UserDetailsService returned null, which is an interface contract violation");
    }
    return loadedUser;
  }
View Full Code Here

    protected TicketResponse validateNow(ProxyTicketValidator pv)
        throws AuthenticationServiceException, BadCredentialsException {
        try {
            pv.validate();
        } catch (Exception internalProxyTicketValidatorProblem) {
            throw new AuthenticationServiceException(internalProxyTicketValidatorProblem.getMessage());
        }

        if (!pv.isAuthenticationSuccesful()) {
            throw new BadCredentialsException(pv.getErrorCode() + ": " + pv.getErrorMessage());
        }
View Full Code Here

                    return;
                }

                if (user == null) {
                    throw new AuthenticationServiceException(
                        "AuthenticationDao returned null, which is an interface contract violation");
                }

                userCache.putUserInCache(user);
            }
View Full Code Here

TOP

Related Classes of org.acegisecurity.AuthenticationServiceException

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.