Custom login page depending on living application being accessed
Hi,
Say I have a living application running on my Bonita runtime: https://localhost:8080/bonita/apps/myWickedApp
with some pages in it, for example: https://localhost:8080/bonita/apps/myWickedApp/blimeyPage
Now, if a user tries to access directly the blimeyPage without having a Bonita session open, the user is automatically redirected to the Bonita login page at:
https://localhost:8080/bonita/login.jsp?redirectUrl=%2Fapps%2FmyWickedApp%2FblimeyPage
But,
- Would it be possible to have in that case the user be redirected to an "app-specific" custom login page instead? For example:
https://localhost:8080/bonita/apps/myWickedApp/wickedLoginPage?redirectUrl=%2Fapps%2FmyWickedApp%2FblimeyPage - If so, which would be the steps to follow?
Thanks in advance for your help.
Regards,
Unai
2 answers
Well, these are some additional answers provided by the Bonitasoft R&D team:
- For the time being, there doesn't seem to be a straightforward way of achieving your goal:
- Whenever the Bonita engine detects a user has no valid session, it redirects systematically to the login.jsp page at the root of the Bonita web application.
- This login.jsp page is unique, meaning that users will always be redirected to the same page, regardless of the application they were trying to access in the first place.
- You could of course customise this login.jsp page to some extent.
- Customise the login.jsp page so that it gathers the redirectUrl parameter and, depending on the value of the redirectUrl parameter, it then dispatches/redirects to the appropriate custom clone of that login page.
- Customise the login.jsp page so that it gathers the redirectUrl parameter and, depending on the value of the redirectUrl parameter, it then dispatches/redirects to the appropriate custom clone of that login page.
- Or else, you could set up some kind of Tomcat valve that will intercept the requests to login.jsp and display your own custom page instead (based on the redirectUrl parameter).
Hopefully this will help.
Comments
Fair enough. Thank you, Laurent.