How to override default Liferay Login authentication?

前端 未结 3 1327
半阙折子戏
半阙折子戏 2021-01-07 08:38

I am using Liferay 6.1, 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

3条回答
  •  太阳男子
    2021-01-07 09:23

    I had made a hook the same way, with these two lines in my hook portal.properties override, AND in portal-ext.properties for good measure:

    auth.pipeline.pre=com.liferay.portal.security.auth.MyCustomAuthenticator
    auth.pipeline.enable.liferay.check=false
    

    However, it seemed to not want to login to Liferay even when the account already existed. I was able to get it fully working and skip Liferay authentication altogether. The hook overriding portal.properties is all I needed, I removed the 2 lines from portal-ext. In your Custom Authenticator, instead of just returning SUCCESS, (com.liferay.portal.security.auth.Authenticator.SUCCESS)

    You want to return SKIP_LIFERAY_CHECK . This is the same as a SUCCESS, except making sure the authentication pipeline knows to skip the liferay check.

    This should force it to work. I believe the source code (for Liferay 6.2 ga5) does not properly take into account the "Skip Liferay Check" property, and this essentially forces it.

提交回复
热议问题