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