Package org.acegisecurity

Examples of org.acegisecurity.AuthenticationCredentialsNotFoundException


   * @param reason to be provided in the exception detail
   * @param secureObject that was being called
   * @param configAttribs that were defined for the secureObject
   */
  private void credentialsNotFound(String reason, Object secureObject, ConfigAttributeDefinition configAttribs) {
    AuthenticationCredentialsNotFoundException exception = new AuthenticationCredentialsNotFoundException(reason);

    AuthenticationCredentialsNotFoundEvent event = new AuthenticationCredentialsNotFoundEvent(secureObject,
        configAttribs, exception);
    publishEvent(event);

View Full Code Here


        throws AuthenticationCredentialsNotFoundException {
        // need to check to see if the current user has a SwitchUserGrantedAuthority
        Authentication current = SecurityContextHolder.getContext().getAuthentication();

        if (null == current) {
            throw new AuthenticationCredentialsNotFoundException(messages.getMessage(
                    "SwitchUserProcessingFilter.noCurrentUser", "No current user associated with this request"));
        }

        // check to see if the current user did actual switch to another user
        // if so, get the original source user so we can switch back
        Authentication original = getSourceAuthentication(current);

        if (original == null) {
            logger.error("Could not find original user Authentication object!");
            throw new AuthenticationCredentialsNotFoundException(messages.getMessage(
                    "SwitchUserProcessingFilter.noOriginalAuthentication",
                    "Could not find original Authentication object"));
        }

        // get the source user details
View Full Code Here

     * @param secureObject that was being called
     * @param configAttribs that were defined for the secureObject
     */
    private void credentialsNotFound(String reason, Object secureObject,
        ConfigAttributeDefinition configAttribs) {
        AuthenticationCredentialsNotFoundException exception = new AuthenticationCredentialsNotFoundException(reason);

        AuthenticationCredentialsNotFoundEvent event = new AuthenticationCredentialsNotFoundEvent(secureObject,
                configAttribs, exception);
        this.eventPublisher.publishEvent(event);

View Full Code Here

        // need to check to see if the current user has a SwitchUserGrantedAuthority
        Authentication current = SecurityContextHolder.getContext()
                                                      .getAuthentication();

        if (null == current) {
            throw new AuthenticationCredentialsNotFoundException(messages
                    .getMessage("SwitchUserProcessingFilter.noCurrentUser",
                        "No current user associated with this request"));
            }

            // check to see if the current user did actual switch to another user
            // if so, get the original source user so we can switch back
            Authentication original = getSourceAuthentication(current);

            if (original == null) {
                logger.error(
                    "Could not find original user Authentication object!");
                throw new AuthenticationCredentialsNotFoundException(messages
                        .getMessage(
                            "SwitchUserProcessingFilter.noOriginalAuthentication",
                            "Could not find original Authentication object"));
                }
View Full Code Here

TOP

Related Classes of org.acegisecurity.AuthenticationCredentialsNotFoundException

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.