Method: Ebay::NotificationApi::Verifier::MessageValidator#valid_message?

Defined in:
lib/ebay/notification_api/verifier/message_validator.rb

#valid_message?Boolean

Returns:

  • (Boolean)


14
15
16
17
18
# File 'lib/ebay/notification_api/verifier/message_validator.rb', line 14

def valid_message?
  verifier = OpenSSL::PKey::EC.new(format_key(public_key_response["key"]))
  signature_base64 = Base64.decode64(signature_json["signature"])
  verifier.verify(OpenSSL::Digest.new(DIGEST), signature_base64, @message.to_json)
end