Skip to content

Commit 2b69231

Browse files
committed
add yard docs
1 parent d84d11f commit 2b69231

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

lib/hooks/app/auth/auth.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
module Hooks
44
module App
5+
# Provides authentication helpers for verifying incoming requests.
6+
#
7+
# @example Usage
8+
# include Hooks::App::Auth
9+
# validate_auth!(payload, headers, endpoint_config)
510
module Auth
6-
# Verify the incoming request using the configured authentication method
11+
# Verifies the incoming request using the configured authentication method.
12+
#
13+
# @param payload [String, Hash] The request payload to authenticate.
14+
# @param headers [Hash] The request headers.
15+
# @param endpoint_config [Hash] The endpoint configuration, must include :auth key.
16+
# @raise [StandardError] Raises error if authentication fails or is misconfigured.
17+
# @return [void]
18+
# @note This method will halt execution with an error if authentication fails.
719
def validate_auth!(payload, headers, endpoint_config)
820
auth_config = endpoint_config[:auth]
921
auth_plugin_type = auth_config[:type].downcase

0 commit comments

Comments
 (0)