Handling users with multiple roles while Login to portal

Problem Statement-
When you have got scenario where in, a user is belonging to multiple roles and you want him/her to select his choice of role while login to portal.

This situation can be solved by developing a custom login portlet and make use of Authentication Filters.

Here is how this would work,
User login using your custom login portlet with his userid & password.

Once user submit,  control goes to authentication filter and there you connect to your user repository to fetch user roles and preset a screen ( next screen of login portlet ) to select his roles.

When user selects his roles and click Login,  control again goes to authentication filter and there you authentication user and redirect user to portal landing page.

I hope that helps.Feel free to post your queries here.

No comments: