|
|
@@ -101,27 +101,6 @@ public class UserJWTController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @PostMapping("/user/eai/token")
|
|
|
- public OkResponse<String> toEai(@RequestBody String token) {
|
|
|
- return OkResponse.of(getEaiToken(token));
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- public String getEaiToken(String token){
|
|
|
- String uri = eaiHost +"/api/auth/loginByPortal";
|
|
|
- System.out.println("开始获取eai token");
|
|
|
- List<NameValuePair> params = new ArrayList<>();
|
|
|
- params.add(new BasicNameValuePair("id_token",token));
|
|
|
- try {
|
|
|
- String response = httpService.sendGet(uri, params, token);
|
|
|
- System.out.println("response" +response);
|
|
|
- return JSONObject.parseObject(response).getJSONObject("data").getString("token");
|
|
|
- } catch (Exception e) {
|
|
|
- throw new CustomErrorException("获取eai token失败");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
|
|
|
@PostMapping("/user/login/yuantu")
|
|
|
public OkResponse<TokenVO> authorizeYuantuUser(@RequestBody LoginVO loginVO) throws CustomErrorException{
|