|
@@ -443,6 +443,7 @@ public class RestClientService {
|
|
jsonObject.put("clientSecret",clientSecret);
|
|
jsonObject.put("clientSecret",clientSecret);
|
|
jsonObject.put("action","append");
|
|
jsonObject.put("action","append");
|
|
jsonObject.put("scopes",scopList);
|
|
jsonObject.put("scopes",scopList);
|
|
|
|
+ //jsonObject.put("password","Asdfg@123");
|
|
HttpHeaders headers = new HttpHeaders();
|
|
HttpHeaders headers = new HttpHeaders();
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
headers.setContentType(type);
|
|
headers.setContentType(type);
|
|
@@ -522,6 +523,28 @@ public class RestClientService {
|
|
return response.getBody();
|
|
return response.getBody();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * author: dzc
|
|
|
|
+ * version: 1.0
|
|
|
|
+ * des: 调用 SSO 的接口判断当前用户是否已经存在
|
|
|
|
+ * date: 2024/8/29
|
|
|
|
+ */
|
|
|
|
+ public JSONObject ifUserInSSO(String userName){
|
|
|
|
+ String url = configService.getConfigValue(ConfigInfo.SSO_IFUSERINSSO)+"/"+userName;
|
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
|
+ MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
|
|
|
|
+ //headers.setContentType(type);
|
|
|
|
+ //headers.add("Authorization", "Bearer " + token);
|
|
|
|
+ HttpEntity<String> httpEntity = new HttpEntity<String>(null, headers);
|
|
|
|
+ restTemplate.setErrorHandler(new MyResponseErrorHandler());
|
|
|
|
+ ResponseEntity<JSONObject> response = restTemplate.exchange(url, HttpMethod.GET,httpEntity, JSONObject.class);
|
|
|
|
+ return response.getBody();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* author: dzc
|
|
* author: dzc
|
|
* version: 1.0
|
|
* version: 1.0
|