3

I am looking to have two factor authentication. That is after login, i want to show an intermediate page. Only after some action has been done on the second page, user is taken to the landing page.

I have logic for second factor authentication ready. Its basically a jsp with some action.

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

I have seen terms of use page, wherein the flag is maintained in db and the code is there in actual implementation class. I dont want to use extension plugin to do this. So I ruled out that option.

Second way is to have a Service Pre Action hook and do the necessary check here. But when I place the code in here, it goes to infinite loop.

Any other way I can do this? Hook is my preference.

Sandeep Nair
  • 3,630
  • 3
  • 26
  • 38

2 Answers2

1

Second way is to have a Service Pre Action hook and do the necessary check here. But when I place the code in here, it goes to infinite loop.

Not sure why this would happen, may be you would need to add a check or a flag which would execute your code only if the second tier authentication fails else it should just normally run the ServicePreAction code.

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

Hope this helps.

Prakash K
  • 11,669
  • 6
  • 51
  • 109
1

I have not checked how to achieve that, but my guess is that extending the login portlet in a hook is the best way. you can store the redirection url, redirect to the intermediate page and then load the stored url.

Regards.

Eduardo Pérez
  • 488
  • 3
  • 10