I run a code for login like:
public String login(String username,String password){
Authentication request = new UsernamePasswordAuthenticationToken(username,password);
Authentication result = authenticationManager.authenticate(request);
SecurityContextHolder.getContext().setAuthentication(result);
return null;
}
I do not use jsf and do not know how to redirect the page to requested secured page after successful login.
I was getting facesContext when using it but now i am not using.
How can redirect by code?