Redirecting to pages after successful authntication : ADF security
Hi All,
I have a use case as in i need to redirect to pages based on user roles after successful authentication.
In security configuration i have unchecked that option "Redirect on successful authentication" and in the doLogin method i am setting the loginURL to 2 different pages based on their roles.(right now i have hardcoded for testing purpose). Also i have assigned respective roles to the pages
if(role == "ADMIN"){
String loginUrl =
"/adfAuthentication?success-url=/faces/pages/AdminHomePage.jspx";
}
els if(role == "USER"){
String loginUrl =
"/adfAuthentication?success-url=/faces/pages/UserHomePage.jspx";
}
HttpServletResponse response =
(HttpServletResponse)ctx.getExternalContext().getResponse();
sendForward(request, response, loginUrl);
Though the code looks straight forward but redirection does not happen.After successful login the i see the same login page :(
Please suggest.
Thanks
Sanjeeb