重定向缺少&符号修改
This commit is contained in:
parent
dc8eb2db8f
commit
f198d19b1d
|
@ -29,7 +29,6 @@ public class AuthService {
|
|||
public static String accessToken(String code,String eoss_ip,String client_id,String client_secret) {
|
||||
HttpHeaders api_headers = new HttpHeaders();//请求头
|
||||
api_headers.add("Content-Type", "application/json; charset=utf-8");
|
||||
// String param= String.format("client_id=%s&client_secret=%s&grant_type=code&authType=0&code= %s",CLIENT_ID,CLIENT_SECRET,code);
|
||||
HashMap<String, Object> requestBody = new HashMap<>();
|
||||
requestBody.put("client_id", client_id);
|
||||
requestBody.put("client_secret", client_secret);
|
||||
|
|
|
@ -33,6 +33,7 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
|||
*/
|
||||
@Override
|
||||
public void callTrdSSOLogin(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, String s) {
|
||||
s = "http://10.1.7.85:8022/ierp/auth/callbackTrdSSO.do?tenantNo=ctsk-dev&sandboxNo=2063179586270661632";
|
||||
//认证中心的登录地址
|
||||
logger.info(String.format("eoss_ip:%s,client_id:%s,client_secret:%s,重定向地址:%s",EOSS_IP,CLIENT_ID,CLIENT_SECRET,s));
|
||||
try {
|
||||
|
@ -40,8 +41,8 @@ public class SSOPluginLogin implements ThirdSSOAuthHandler {
|
|||
/**
|
||||
* 获取授权码
|
||||
*/
|
||||
String ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0redirect_uri=%s",
|
||||
EOSS_IP,CLIENT_ID,s);
|
||||
String ssourl=String.format("%s/sso2/authCenter/authorize?client_id=%s&response_type=code&authType=0&redirect_uri=%s",
|
||||
EOSS_IP,CLIENT_ID,EOSS_IP);
|
||||
logger.info(String.format("重定向地址→sendRedirect:%s",ssourl));
|
||||
httpServletResponse.sendRedirect(ssourl);
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue