xhxu 3 роки тому
джерело
коміт
7178b27a6a
1 змінених файлів з 7 додано та 0 видалено
  1. +7
    -0
      mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java

+ 7
- 0
mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java Переглянути файл

@@ -80,8 +80,15 @@ public class TtOpenComponentServiceImpl implements TtOpenComponentService {
@Override
public boolean checkSignature(String timestamp, String nonce, String encrypt, String signature) {
try {
log.info("-----------token="+getWxOpenConfigStorage().getComponentToken()
+"---------timestamp="+timestamp
+"---------nonce="+nonce
+"---------encrypt="+encrypt
+"---------signature="+signature
);
ServerVerification verification = new ServerVerification();
String newMsgSignature = verification.getMsgSignature(getWxOpenConfigStorage().getComponentToken(),timestamp, nonce, encrypt);
log.info("------------newMsgSignature="+newMsgSignature);
return verification.verify(signature,newMsgSignature);
} catch (Exception e) {
this.log.error("Checking signature failed, and the reason is :" + e.getMessage());


Завантаження…
Відмінити
Зберегти