Forums de discussion
Overriding Liferay Login authentication
Hir O, modifié il y a 12 années.
Overriding Liferay Login authentication
Junior Member Publications: 30 Date d'inscription: 14/03/12 Publications récentes
Hi All,
I am using Liferay 6.0.6, and I want to override default Liferay Login authentication and want to set up my custom authentication.
Till now what I have done is, I have created a hook-plugin and have setup following properties in portal.properties file
auth.pipeline.pre=com.liferay.portal.security.auth.MyCustomAuthenticator
auth.pipeline.enable.liferay.check=false
where MyCustomAuthenticator is my custom authenticator class ( which implements Authenticator).
Currently, Liferay checks this custom authentication 1st, but then again it goes to Liferay itself for further Liferay authentication too.
I want to override this Liferay validation. Please help me solve this issue.
I am using Liferay 6.0.6, and I want to override default Liferay Login authentication and want to set up my custom authentication.
Till now what I have done is, I have created a hook-plugin and have setup following properties in portal.properties file
auth.pipeline.pre=com.liferay.portal.security.auth.MyCustomAuthenticator
auth.pipeline.enable.liferay.check=false
where MyCustomAuthenticator is my custom authenticator class ( which implements Authenticator).
Currently, Liferay checks this custom authentication 1st, but then again it goes to Liferay itself for further Liferay authentication too.
I want to override this Liferay validation. Please help me solve this issue.
Hitoshi Ozawa, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentesand have setup following properties in portal.properties file
Instead of portal.properties file, create a portal-ext.properties file.
Hir O, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Junior Member Publications: 30 Date d'inscription: 14/03/12 Publications récentes
Hi Hitoshi,
Thanks for replying.
I have mapped portal.properties file in liferay-hook.xml as follows.
[indent]<hook>
<portal-properties>portal.properties</portal-properties>
</hook>[/indent]
You want me to change this by new portal-ext.properties file or want me to change in the liferay's portal-ext.properties file??
Thanks for replying again
Thanks for replying.
I have mapped portal.properties file in liferay-hook.xml as follows.
[indent]<hook>
<portal-properties>portal.properties</portal-properties>
</hook>[/indent]
You want me to change this by new portal-ext.properties file or want me to change in the liferay's portal-ext.properties file??
Thanks for replying again
Amos Fong, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Liferay Legend Publications: 2047 Date d'inscription: 07/10/08 Publications récentes
Hi,
According to the liferay hook DTD, http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd, auth.pipeline.enable.liferay.check is not a property you can override in a hook.
You can do what Hitoshi suggests and change portal-ext.properties for your liferay portal.
According to the liferay hook DTD, http://www.liferay.com/dtd/liferay-hook_6_1_0.dtd, auth.pipeline.enable.liferay.check is not a property you can override in a hook.
You can do what Hitoshi suggests and change portal-ext.properties for your liferay portal.
Anil Sunkari, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
Hi Hirav,
Please check with what Hithosi suggested you & i'm also wondering can we make change of props files as -ext.prop.If it works then you issue will also be resolved.If not let me know i have some other idea but will think on more compatibility.
Thanks,
Anil Sunkari
Please check with what Hithosi suggested you & i'm also wondering can we make change of props files as -ext.prop.If it works then you issue will also be resolved.If not let me know i have some other idea but will think on more compatibility.
Thanks,
Anil Sunkari
Hir O, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Junior Member Publications: 30 Date d'inscription: 14/03/12 Publications récentes
Hi All
Thank you all, I have solved the issue.
I just want 1 more thing. Can I have HttpServletRequest object there at Authenticator class??
Thanks again for replying
Thank you all, I have solved the issue.
I just want 1 more thing. Can I have HttpServletRequest object there at Authenticator class??
Thanks again for replying
Anil Sunkari, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
Try this ......
If you have ActionRequest object actionReq
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(actionReq);
Thanks,
Anil Sunkari
If you have ActionRequest object actionReq
HttpServletRequest httpRequest = PortalUtil.getHttpServletRequest(actionReq);
Thanks,
Anil Sunkari
Hir O, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Junior Member Publications: 30 Date d'inscription: 14/03/12 Publications récentes
I don't have it directly.
Can I get it through any Util class like PortalUtil or any??
Can I get it through any Util class like PortalUtil or any??
Anil Sunkari, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
Hir O, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Junior Member Publications: 30 Date d'inscription: 14/03/12 Publications récentes
Hi All,
I actually want to set some values to my Browser Cookies after this authentication. Here I am authenticating user through openAM and so as I want to store the token to the cookies to get used by other applications on the same domain to use single sign on.
I don't know much about ThreadLocal, but I don't think it will help me with this.
Please help me solve this.
Thanks
I actually want to set some values to my Browser Cookies after this authentication. Here I am authenticating user through openAM and so as I want to store the token to the cookies to get used by other applications on the same domain to use single sign on.
I don't know much about ThreadLocal, but I don't think it will help me with this.
Please help me solve this.
Thanks
Anil Sunkari, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
Expert Publications: 427 Date d'inscription: 12/08/09 Publications récentes
Try with this quick solution.... may be it might resolve your hope !! i believe
create a customattribute for user
In Authenication class you have map .So, you can call one method to store some information which u need to pass to other systems as a custom attribute for user
then after post login u can retrive this info from table and you have request in post login, finally store it in cookie or session to pass these values to other systems.
Meanwhile have a look at
UserLocalServiceImpl.java at 2628 line for authentication module once.
Regards,
Anil Sunkari
create a customattribute for user
In Authenication class you have map .So, you can call one method to store some information which u need to pass to other systems as a custom attribute for user
then after post login u can retrive this info from table and you have request in post login, finally store it in cookie or session to pass these values to other systems.
Meanwhile have a look at
UserLocalServiceImpl.java at 2628 line for authentication module once.
Regards,
Anil Sunkari
a b, modifié il y a 12 années.
RE: Overriding Liferay Login authentication
New Member Publications: 4 Date d'inscription: 13/02/12 Publications récentesHir O:
Hi All
Thank you all, I have solved the issue.
I just want 1 more thing. Can I have HttpServletRequest object there at Authenticator class??
Thanks again for replying
How did you solve your issue? I will be great if you can mention the solution so others can benefit.
Thanks.
Greg M, modifié il y a 10 années.
RE: Overriding Liferay Login authentication
New Member Publications: 5 Date d'inscription: 12/11/13 Publications récentes
Hi All,
I realize this is an old post, but could you detail the solution to override the second authentication done by liferay please?
Thanks
I realize this is an old post, but could you detail the solution to override the second authentication done by liferay please?
Thanks
Harsh Kanakhara, modifié il y a 7 années.
RE: Overriding Liferay Login authentication
New Member Publications: 14 Date d'inscription: 29/01/16 Publications récentes
In my login portlet I am including one extra field which used to store some url. During Sign-In I only want to pass that url. But in the authentication pipeline username or screen name is mandatory.
I want to write my custom business logic in the custom authenticator class which will fetch username based on url. How do I achieve it ?
I want to write my custom business logic in the custom authenticator class which will fetch username based on url. How do I achieve it ?