#571 : modify loginRedirect method

This commit is contained in:
Shinsuke Sugaya 2016-07-09 19:58:18 +09:00
parent 26bf5a3bec
commit 0fdba58ad2
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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();
});