Sha256: a110160a3704807820b5bdf47d99e2c96c2f294bedb8fb881dde889a3fdd78e4
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 Bytes
Contents
=begin #HelloSign API #HelloSign v3 API The version of the OpenAPI document: 3.0.0 Contact: apisupport@hellosign.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.3.0 =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 | lib/hellosign-ruby-sdk/event_callback_helper.rb |