forked from github/dataease
Merge pull request #2479 from dataease/pr@dev@perf_format_conde
perf: 格式化代码
This commit is contained in:
commit
a370507ada
@ -5,7 +5,6 @@ import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.Cookie;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
@ -63,7 +62,8 @@ public class SSOServer {
|
||||
Map<String, String> config = config(oidcXpackService);
|
||||
SSOToken ssoToken = oidcXpackService.requestSsoToken(config, code, state);
|
||||
idToken = ssoToken.getIdToken();
|
||||
Cookie cookie_id_token = new Cookie("IdToken", ssoToken.getIdToken());cookie_id_token.setPath("/");
|
||||
Cookie cookie_id_token = new Cookie("IdToken", ssoToken.getIdToken());
|
||||
cookie_id_token.setPath("/");
|
||||
response.addCookie(cookie_id_token);
|
||||
|
||||
SSOUserInfo ssoUserInfo = oidcXpackService.requestUserInfo(config, ssoToken.getAccessToken());
|
||||
@ -81,9 +81,11 @@ public class SSOServer {
|
||||
ServletUtils.setToken(token);
|
||||
|
||||
|
||||
Cookie cookie_token = new Cookie("Authorization", token);cookie_token.setPath("/");
|
||||
Cookie cookie_token = new Cookie("Authorization", token);
|
||||
cookie_token.setPath("/");
|
||||
|
||||
Cookie cookie_ac_token = new Cookie("AccessToken", ssoToken.getAccessToken());cookie_ac_token.setPath("/");
|
||||
Cookie cookie_ac_token = new Cookie("AccessToken", ssoToken.getAccessToken());
|
||||
cookie_ac_token.setPath("/");
|
||||
|
||||
response.addCookie(cookie_token);
|
||||
|
||||
@ -112,6 +114,7 @@ public class SSOServer {
|
||||
}
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
private Map<String, String> config(OidcXpackService oidcXpackService) {
|
||||
List<SysSettingDto> sysSettingDtos = oidcXpackService.oidcSettings();
|
||||
Map<String, String> config = sysSettingDtos.stream().collect(HashMap::new, (m, v) -> m.put(v.getParamKey(), v.getParamValue()), HashMap::putAll);
|
||||
@ -120,6 +123,4 @@ public class SSOServer {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user