|
@@ -36,6 +36,8 @@ public class SignVerificationAspect {
|
|
|
|
|
|
@Value("${ucenter.publicKey}")
|
|
@Value("${ucenter.publicKey}")
|
|
private String publicKey;
|
|
private String publicKey;
|
|
|
|
+ @Value("${ucenter.appId}")
|
|
|
|
+ private String ucenterAppId;
|
|
|
|
|
|
@Value("${fdService.basePath}")
|
|
@Value("${fdService.basePath}")
|
|
private String fdServiceBasePath;
|
|
private String fdServiceBasePath;
|
|
@@ -63,12 +65,12 @@ public class SignVerificationAspect {
|
|
Instant now = Instant.now();
|
|
Instant now = Instant.now();
|
|
long epochSecond = now.getEpochSecond();
|
|
long epochSecond = now.getEpochSecond();
|
|
JSONObject playload = new JSONObject();
|
|
JSONObject playload = new JSONObject();
|
|
- playload.put("appId", "ucenter");
|
|
|
|
|
|
+ playload.put("appId", ucenterAppId);
|
|
playload.put("timestamp", epochSecond);
|
|
playload.put("timestamp", epochSecond);
|
|
String ucenterSign = RsaUtils.encipher(playload.toJSONString(), publicKey);
|
|
String ucenterSign = RsaUtils.encipher(playload.toJSONString(), publicKey);
|
|
Map<String, String> headerMap = new HashMap<>();
|
|
Map<String, String> headerMap = new HashMap<>();
|
|
headerMap.put("sign", ucenterSign);
|
|
headerMap.put("sign", ucenterSign);
|
|
- headerMap.put("appId", "ucenter");
|
|
|
|
|
|
+ headerMap.put("appId", ucenterAppId);
|
|
String url = fdServiceBasePath + GET_PRIVATEKEY_API + appId;
|
|
String url = fdServiceBasePath + GET_PRIVATEKEY_API + appId;
|
|
Result result = myClient.get(url, headerMap);
|
|
Result result = myClient.get(url, headerMap);
|
|
if(result.getCode() != ServerCode.SUCCESS.code()){
|
|
if(result.getCode() != ServerCode.SUCCESS.code()){
|