掲示板

Move all the login code into my own portlet

thumbnail
9年前 に Ying Wang によって更新されました。

Move all the login code into my own portlet

New Member 投稿: 22 参加年月日: 13/10/22 最新の投稿
I want to create a login portlet. I directly copy the code from the LoginAction.processAction into my own portlet controller.
The code run correctly, and I feel the authentication is passed, because I have got userId and authResult =1. But I still can't access protected web page, just like nothing happened. I mean when I visited a url address, it navigate to login page. I don't know what's wrong. The way to copy paste LoginAction.processAction may be not a good idea.. Can anyone tell me a solution to create a custom login portlet.
thumbnail
9年前 に Olaf Kock によって更新されました。

RE: Move all the login code into my own portlet

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
Any particular reason why you want to implement a feature that is already included?
thumbnail
9年前 に Ying Wang によって更新されました。

RE: Move all the login code into my own portlet

New Member 投稿: 22 参加年月日: 13/10/22 最新の投稿
Olaf Kock:
Any particular reason why you want to implement a feature that is already included?


I want to override the standard login portlet. But I hope to see the original liferay code can work in my own porlet, so that I can have litter update on it to implement my own authentication logic. But as I have said, it doesn't work at all, though it return the authentication success result. But I can't send the result to lfieray.

My requirement is to use two login page to do login. The first page is to do a normal authentication, the second page is to do another authentication with custom rule.
When the two authentication passed, it navigate to the app home page.

I suppose I should have a new authenticator with my own logic, but it seems have to use ext. But I suppose ext is not suggested in liferay. I am not sure whether hook plugin can satisfy my requirement. Can anyone give me some advice?
thumbnail
9年前 に Jitendra Rajput によって更新されました。

RE: Move all the login code into my own portlet

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
Instead of re creating same thing try to customize feature of login portlet using hook.