Redirect user to requested pages after login

Asked

Viewed 620 times

0

Here in the company it is common to pass news links from the portal to others via email, but when the user opens the link he asks for authentication in the system, but after logging in he is redirected to the home page (index.jsf) and not to the news that he wanted to access.

método de login

phaseListener método beforePhase

Front-end com form de login

  • This happens because the shiro is configured, for whenever any user logs in, is redirected to the page index.jsf. You need a treatment that captures the URL that will be accessed and stores it until the user authenticates. One idea (I don’t think it’s the right one) is that you pass this URL to the login bean itself, and when you finish the whole authentication process, you perform a forced redirect to the requested URL.

  • The point is that I haven’t found (yet) a way to get this URL that the user accessed and save it until the authentication is performed.

  • A getRequestURL() doesn’t solve?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.