Browse Source

update tt

master
xhxu 3 years ago
parent
commit
7178b27a6a
1 changed files with 7 additions and 0 deletions
  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 View File

@@ -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());


Loading…
Cancel
Save