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 4
4
require_relative "../../core/log"
5
5
require_relative "../../core/global_components"
6
6
require_relative "../../core/component_access"
7
+ require_relative "timestamp_validator"
7
8
8
9
module Hooks
9
10
module Plugins
@@ -53,6 +54,13 @@ def self.fetch_secret(config, secret_env_key_name: :secret_env_key)
53
54
return secret . strip
54
55
end
55
56
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
+
56
64
# Find a header value by name with case-insensitive matching
57
65
#
58
66
# @param headers [Hash] HTTP headers from the request
Original file line number Diff line number Diff line change 3
3
require "openssl"
4
4
require "time"
5
5
require_relative "base"
6
- require_relative "timestamp_validator"
7
6
8
7
module Hooks
9
8
module Plugins
@@ -271,14 +270,6 @@ def self.valid_timestamp?(headers, config)
271
270
timestamp_validator . valid? ( timestamp_value , tolerance )
272
271
end
273
272
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
-
282
273
# Compute HMAC signature based on configuration requirements
283
274
#
284
275
# Generates the expected HMAC signature for the given payload using the
You can’t perform that action at this time.
0 commit comments