Sfoglia il codice sorgente

#571 : modify loginRedirect method

Shinsuke Sugaya 9 anni fa
parent
commit
0fdba58ad2

+ 6 - 0
src/main/java/org/codelibs/fess/app/web/base/login/FessLoginAssist.java

@@ -143,6 +143,12 @@ public class FessLoginAssist extends TypicalLoginAssist<String, FessUserBean, Fe
     //                                                                     Login Extention
     //                                                                      ==============
 
+    @Override
+    public HtmlResponse loginRedirect(String account, String password, LoginOpCall opLambda, LoginRedirectSuccessCall oneArgLambda)
+            throws LoginFailureException {
+        return loginRedirect(new UserPasswordLoginCredential(account, password), opLambda, oneArgLambda);
+    }
+
     public HtmlResponse loginRedirect(final LoginCredential credential, final LoginOpCall opLambda,
             final LoginRedirectSuccessCall oneArgLambda) throws LoginFailureException {
         doLogin(credential, createLoginOption(opLambda)); // exception if login failure

+ 1 - 1
src/main/java/org/codelibs/fess/app/web/login/LoginAction.java

@@ -45,7 +45,7 @@ public class LoginAction extends FessLoginAction {
         final String password = form.password;
         form.clearSecurityInfo();
         try {
-            return fessLoginAssist.loginRedirect(new UserPasswordLoginCredential(username, password), op -> {}, () -> {
+            return fessLoginAssist.loginRedirect(username, password, op -> {}, () -> {
                 activityHelper.login(getUserBean());
                 return getHtmlResponse();
             });