Examples of AuthenticationException


Examples of org.springframework.nanotrader.service.support.exception.AuthenticationException

        if (accountProfile != null) {
            accountProfileResponse = new Accountprofile();
            mapper.map(accountProfile, accountProfileResponse, ACCOUNT_PROFILE_MAPPING);
        } else {
            log.error("TradingServiceFacadeImpl.findAccountprofileByAuthtoken(): accountProfile is null for token=" + token);
            throw new AuthenticationException("Authorization Token not found");
        }
       
        return accountProfileResponse;
    }
View Full Code Here

Examples of org.springframework.security.AuthenticationException

            String access_error,
            @RequestParam(value = "login_error", required = false)
            String login_error, ModelMap map)
            throws InfrastructureException {

        AuthenticationException authExcept = (AuthenticationException) req
                .getSession()
                .getAttribute(
                        AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY);

        // parameter may be on param line if we're redirect:ed here
        // (createUserController)
        map.addAttribute("message", req.getParameter("message"));
       
        if (authExcept != null) {
            String message = authExcept.getMessage();
            log.info("Login Error " + message + " uname: "
                    + req.getParameter("j_username"));
            map.addAttribute("login_error", message);
        }
        if (access_error != null) {
View Full Code Here

Examples of org.springframework.security.AuthenticationException

    /** Test commence(). */
    @Test public void testCommence() throws Exception {
        ServletRequest request = mock(ServletRequest.class);
        ServletResponse response = mock(ServletResponse.class);
        AuthenticationException exception = mock(AuthenticationException.class);
        GaeAuthenticationEntryPoint entryPoint = new GaeAuthenticationEntryPoint();
        entryPoint.commence(request, response, exception)// just make sure it runs (it's a no-op)
    }
View Full Code Here

Examples of org.springframework.security.core.AuthenticationException

    @Test
    public void onAuthenticationFailure() throws IOException, ServletException {
        MockHttpServletRequest request = new MockHttpServletRequest();
        MockHttpServletResponse response = new MockHttpServletResponse();
        AuthenticationException ex = new BadCredentialsException("");

        failureHandler.onAuthenticationFailure(request, response, ex);

        assertEquals(MockHttpServletResponse.SC_UNAUTHORIZED, response.getStatus());
        assertEquals(RestAuthenticationFailureHandler.STATUS_MESSAGE_AUTHENTICATION_FAILED, response.getErrorMessage());
View Full Code Here

Examples of org.springframework.security.core.AuthenticationException

    @Test
    public void commence() throws IOException, ServletException {
        MockHttpServletRequest request = new MockHttpServletRequest();
        MockHttpServletResponse response = new MockHttpServletResponse();
        AuthenticationException ex = new AuthenticationCredentialsNotFoundException("");

        authenticationEntryPoint.commence(request, response, ex);

        assertEquals(HttpServletResponse.SC_UNAUTHORIZED, response.getStatus());
    }
View Full Code Here

Examples of org.structr.core.auth.exception.AuthenticationException

    }

    if (errorMsg != null) {

      throw new AuthenticationException(errorMsg);
    }

    return principal;

  }
View Full Code Here

Examples of org.thechiselgroup.choosel.workbench.client.authentication.AuthenticationException

        persistenceManagerFactory = pmf;
    }

    public void checkAuthenticated() throws AuthenticationException {
        if (!userService.isUserLoggedIn()) {
            throw new AuthenticationException(
                    "Authentication failed: User not signed in.");
        }
    }
View Full Code Here

Examples of org.uberfire.security.auth.AuthenticationException

        try {
            final Subject subject = authManager.authenticate( httpContext );
            httpContext.setCurrentSubject( subject );
            return subject;
        } catch ( Exception ex ) {
            throw new AuthenticationException( "Validation fails.", ex );
        }
    }
View Full Code Here

Examples of org.wso2.carbon.core.common.AuthenticationException

                }
            }

        } catch (AxisFault e) {
            log.error(e.getMessage(), e);
            throw new AuthenticationException(e.getMessage(), e);
        }
        return isValidRememberMe;
    }
View Full Code Here

Examples of se.despotify.exceptions.AuthenticationException

    try{
      this.protocol.sendAuthenticationPacket();
      this.protocol.receiveAuthenticationPacket();
    }
    catch(DespotifyException e){
      throw new AuthenticationException(e.getMessage());
    }
   
    return this.protocol;
  }
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.