Liferay - intermediate page after login and logout

I am looking for two factor authentication. This is after login, I want to show the intermediate page. Only after some actions have been taken on the second page, the user is sent to the landing page.

I have logic for second factor authentication. It is mostly jsp with some action.

However I am not sure what is the correct approach to insert this intermediate page.

I have seen the terms of use pages where the flag is maintained in the db and the code is present in the actual implementation class. I don't want to use an extension plugin for this. So I ruled out this option.

The second way is to execute the Service Order command and do the required check here. But when I put the code here, it goes into an infinite loop.

How can i do this? The hook is my preference.

+3


source to share


2 answers


The second way is to set the "Service Action" and perform the necessary actions, check here. But when I post the code here, it goes into an infinite loop.

Not sure why this will happen, maybe you will need to add a check or a flag that will only execute your code if the second level authentication fails, otherwise it should run the code fine ServicePreAction

.



Another way I can think of is using a custom action struts to show your JSP and perform the desired action in a custom action class.

Hope it helps.

+1


source


I have not tested how to achieve this, but my guess is the best way to extend the hook login portlet. you can save the redirect url, redirect to an intermediate page and then load the saved url.



Sincerely.

+1


source







All Articles