Liferay 6.1を使用していますが、デフォルトのLiferayログイン認証を上書きし、カスタム認証を設定したいと考えています。
これまで私が行ったことは、フックプラグインを作成し、portal.propertiesファイルに次のプロパティを設定したことです。
auth.pipeline.pre=com.liferay.portal.security.auth.MyCustomAuthenticator
auth.pipeline.enable.liferay.check=false
ここで、MyCustomAuthenticatorは、(Authenticatorを実装する)カスタムオーセンティケータークラスです。
現在、Liferayはこのカスタム認証を最初にチェックしますが、その後もLiferay自体に送られ、さらにLiferay認証が行われます。
このLiferay検証を上書きしたいと思います。この問題の解決にご協力ください。これが私のオーセンティケータークラスです:
public class MyCustomAuthenticator implements Authenticator {
public int authenticateByEmailAddress(long arg0, String arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("succeeded by mail");
return SUCCESS;
}
public int authenticateByScreenName(long arg0, String arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("succeeded by screen name");
return SUCCESS;
}
public int authenticateByUserId(long arg0, long arg1, String arg2, Map<String, String[]> arg3, Map<String, String[]> arg4) throws AuthException {
System.out.println("succeeded by user id");
return SUCCESS;
}
}