Sha256: 8c3d2fb6102598b2f692f5a81c257065a84703c8a61a38f98adc86e55951f70f
Contents?: true
Size: 474 Bytes
Versions: 1
Compression:
Stored size: 474 Bytes
Contents
=begin {{> api_info}} =end require 'openssl' module HelloSign class EventCallbackHelper # Verify that a callback came from HelloSign.com # # @param [String] api_key # @param [EventCallbackRequestEvent] event # @return bool def self.is_valid(api_key, event) hash = OpenSSL::HMAC.hexdigest( "SHA256", api_key, "#{event.event_time}#{event.event_type}", ) return event.event_hash === hash end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hellosign-ruby-sdk-6.0.0.pre.beta | templates/event_callback_helper.mustache |