You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.7 KiB
59 lines
1.7 KiB
4 years ago
|
package com.fr.plugin.login.handler;
|
||
|
|
||
|
import com.fr.decision.fun.impl.BaseHttpHandler;
|
||
|
import com.fr.decision.webservice.utils.WebServiceUtils;
|
||
|
import com.fr.decision.webservice.v10.login.LoginService;
|
||
|
import com.fr.json.JSONObject;
|
||
|
import com.fr.locale.InterProviderFactory;
|
||
|
import com.fr.plugin.login.config.simple.account.PluginSimpleConfig;
|
||
|
import com.fr.plugin.login.utils.FRUtils;
|
||
|
import com.fr.plugin.transform.FunctionRecorder;
|
||
|
import com.fr.plugin.weixin.server.bean.WeiXinAgent;
|
||
|
import com.fr.plugin.weixin.server.config.WeiXinConfig;
|
||
|
import com.fr.plugin.weixin.server.constant.WeiXinConstants;
|
||
|
import com.fr.plugin.weixin.server.log.WeiXinLogErrorCode;
|
||
|
import com.fr.plugin.weixin.server.log.WeiXinLoggerFactory;
|
||
|
import com.fr.plugin.weixin.server.util.*;
|
||
|
import com.fr.stable.StringUtils;
|
||
|
import com.fr.third.springframework.web.bind.annotation.RequestMethod;
|
||
|
import com.fr.web.utils.WebUtils;
|
||
|
import org.slf4j.MDC;
|
||
|
|
||
|
import javax.servlet.http.HttpServletRequest;
|
||
|
import javax.servlet.http.HttpServletResponse;
|
||
|
|
||
|
@FunctionRecorder
|
||
|
public class AdminLogin extends BaseHttpHandler {
|
||
|
|
||
|
|
||
|
public AdminLogin() {
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public RequestMethod getMethod() {
|
||
|
return RequestMethod.GET;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public String getPath() {
|
||
|
return "/login";
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public boolean isPublic() {
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
@Override
|
||
|
public void handle(HttpServletRequest req, HttpServletResponse res) throws Exception {
|
||
|
//登录页面登陆的用户名
|
||
|
String username = req.getParameter("username");
|
||
|
|
||
|
PluginSimpleConfig psc = PluginSimpleConfig.getInstance();
|
||
|
String index = psc.getIndex();
|
||
|
FRUtils.login(req,res,username,index);
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|