添加山东通单点登录
This commit is contained in:
parent
4ed920651a
commit
35fe09a3e4
|
@ -206,13 +206,14 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
Integer expiresOffset = 60 * 5;
|
||||
expiresIn = expiresIn < expiresOffset ? expiresIn / 2 : expiresIn -expiresOffset;
|
||||
token.expiresIn = DateUtil.offset(new Date(), DateField.SECOND, expiresIn);
|
||||
sdtToken = token;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
UrlBuilder urlBuilder = UrlBuilder.ofHttp(requestUri, CharsetUtil.CHARSET_UTF_8);
|
||||
CharSequence code = urlBuilder.getQuery().get("code");
|
||||
String userInfoUrl = String.format("%s/cgi-bin/user/getuserinfo?access_token=&s&code=%s",
|
||||
String userInfoUrl = String.format("%s/cgi-bin/user/getuserinfo?access_token=%s&code=%s",
|
||||
apiUrl,
|
||||
sdtToken.accessToken,
|
||||
code);
|
||||
|
@ -240,8 +241,8 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
cookie.setPath("/");
|
||||
response.addCookie(cookie);
|
||||
response.addHeader(Constant.TOKEN_HEADER, currentToken);
|
||||
//去掉凭证参数
|
||||
String removeCreditParame = ssoValidator.removeCreditParame(requestUri);
|
||||
//回调不涉及其他页面回调,先写死回调首页
|
||||
String removeCreditParame = "http://" + urlBuilder.getHost() + ":" + urlBuilder.getPort() + "/#/home";
|
||||
response.addHeader("REDIRECT", removeCreditParame);
|
||||
request.setAttribute(Constant.TOKEN_HEADER, currentToken);
|
||||
return executeLogin(request, response);
|
||||
|
|
|
@ -165,5 +165,5 @@ shangdongtong:
|
|||
corpid: wwafa1a3005a15a672
|
||||
agentId: 1001129
|
||||
secret: fCcaNBVkCosL_O3cnQVQ0brqUUBZu3ruXuISj5k8FP8
|
||||
url: http://59.206.205.195:80
|
||||
url: http://15.72.183.90:7008/sdt
|
||||
|
||||
|
|
Loading…
Reference in New Issue