Package org.springframework.security.web.authentication

Examples of org.springframework.security.web.authentication.WebAuthenticationDetailsSource


      if (TokenUtils.validateToken(authToken, userDetails)) {

        UsernamePasswordAuthenticationToken authentication =
            new UsernamePasswordAuthenticationToken(userDetails, null, userDetails.getAuthorities());
        authentication.setDetails(new WebAuthenticationDetailsSource().buildDetails(httpRequest));
        SecurityContextHolder.getContext().setAuthentication(authentication);
      }
    }

    chain.doFilter(request, response);
View Full Code Here


    @Before
    public void before() throws Exception {
        // mocking
        authenticationManager = mock(AuthenticationManager.class);
        detailsSource = new WebAuthenticationDetailsSource();
        filter = new SpnegoAuthenticationProcessingFilter();
        filter.setAuthenticationManager(authenticationManager);
        request = mock(HttpServletRequest.class);
        response = mock(HttpServletResponse.class);
        chain = mock(FilterChain.class);
View Full Code Here

TOP

Related Classes of org.springframework.security.web.authentication.WebAuthenticationDetailsSource

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.