File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 44require_relative "../../core/log"
55require_relative "../../core/global_components"
66require_relative "../../core/component_access"
7+ require_relative "timestamp_validator"
78
89module Hooks
910 module Plugins
@@ -53,6 +54,13 @@ def self.fetch_secret(config, secret_env_key_name: :secret_env_key)
5354 return secret . strip
5455 end
5556
57+ # Get timestamp validator instance
58+ #
59+ # @return [TimestampValidator] Singleton timestamp validator instance
60+ def self . timestamp_validator
61+ @timestamp_validator ||= TimestampValidator . new
62+ end
63+
5664 # Find a header value by name with case-insensitive matching
5765 #
5866 # @param headers [Hash] HTTP headers from the request
Original file line number Diff line number Diff line change 33require "openssl"
44require "time"
55require_relative "base"
6- require_relative "timestamp_validator"
76
87module Hooks
98 module Plugins
@@ -271,14 +270,6 @@ def self.valid_timestamp?(headers, config)
271270 timestamp_validator . valid? ( timestamp_value , tolerance )
272271 end
273272
274- # Get timestamp validator instance
275- #
276- # @return [TimestampValidator] Singleton timestamp validator instance
277- # @api private
278- def self . timestamp_validator
279- @timestamp_validator ||= TimestampValidator . new
280- end
281-
282273 # Compute HMAC signature based on configuration requirements
283274 #
284275 # Generates the expected HMAC signature for the given payload using the
You can’t perform that action at this time.
0 commit comments