Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void saveSecurityContext(HttpServletResponse httpResponse,
- HttpServletRequest httpRequest,
- Authentication authenticationResponse) {
- SecurityContext securityContext = new SecurityContextImpl(authenticationResponse);
- SecurityContextHolder.setContext(securityContext);
- this.securityContextRepository.saveContext(securityContext, httpRequest, httpResponse);
- }
- private Authentication authenticateUser(String username, String password) {
- UserDetails userDetails = applicationUserDetailsService.loadUserByUsername(username);
- Authentication authentication = new UsernamePasswordAuthenticationToken(userDetails, password);
- return this.authenticationManager.authenticate(authentication);
- }
Advertisement
Add Comment
Please, Sign In to add comment