Skip to content

Commit 92a6dcf

Browse files
committed
add shared_secret
1 parent 473809f commit 92a6dcf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/hooks/app/api.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ def validate_request(payload, headers, endpoint_config)
7474
case validator_type
7575
when "hmac"
7676
validator_class = Plugins::RequestValidator::HMAC
77+
when "shared_secret"
78+
validator_class = Plugins::RequestValidator::SharedSecret
7779
else
7880
error!("Custom validators not implemented in POC", 500)
7981
end

lib/hooks/plugins/request_validator/shared_secret.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ module RequestValidator
1515
#
1616
# @example Basic configuration
1717
# request_validator:
18-
# type: SharedSecret
18+
# type: shared_secret
1919
# header: Authorization
2020
#
2121
# @example Custom header configuration
2222
# request_validator:
23-
# type: SharedSecret
23+
# type: shared_secret
2424
# header: X-API-Key
2525
#
2626
# @note This validator performs direct string comparison of the shared secret.

0 commit comments

Comments
 (0)