我拼命想在这里重现例如我的Liferay的Tomcat软件包: http://liferay-blogging.blogspot.be/2011/08/how-to-change-liferay-login-module.html如何覆盖Liferay的认证
我已经重新笔者的包和类:
package de.test.auth;
import java.util.Map;
import com.liferay.portal.security.auth.AuthException;
import com.liferay.portal.security.auth.Authenticator;
public class RefuseAuthenticator implements Authenticator {
public int authenticateByEmailAddress(long arg0, String arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("failed by mail");
return FAILURE;
}
public int authenticateByScreenName(long arg0, String arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("failed by screen name");
return FAILURE;
}
public int authenticateByUserId(long arg0, long arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("failed by user id");
return FAILURE;
}
}
我导出包作为我放置在LR-门户/ TOMCAT/LIB/ext文件夹
jar文件我添加了2行:
auth.pipeline.enable.liferay.check=false
auth.pipeline.pre=de.test.auth.RefuseAuthenticator
位于位于LR-portal/TOMCAT/webapps/ROOT/WEB-INF/lib/portlet_impl.jar中的标准portal.properties文件中。 我知道它应该在一个portal-ext.properties文件中,但它没有奏效,所以我消除了所有可能的副作用。
不幸的是,Liferay会不断记录我的用户。 我读过关于在Liferay中执行自定义代码的钩子和ext方法,所以我可能会丢失一些东西。在写这里之前,我阅读了许多论坛帖子。
我正在使用liferay-ce-portal-7.0-ga3 tomcat包。
谢谢。
正如博客文章所示,尝试使用ext for this,并且在调试模式下使用sserver来验证在认证过程中到相应类的流 –