void verifySignature ( JsonNode messageJson ) { if ( ! signatureChecker . verifySignature ( toMap ( messageJson ) , fetchPublicKey ( messageJson ) ) ) { throw new SdkClientException ( "Signature in SNS message was invalid" ) ; } }
Verifies the signature of the SNS message by downloading the public certificate from SNS and computing the signature from the request properties . If the signature does not match or if the cert is inaccessible or invalid and exception will be thrown .