Skip to content

Commit 9667e4a

Browse files
authored
Merge pull request rails#49487 from yawboakye/clarify-login-procedure-expectation
Clarify `login_procedure`'s responsibility during request authentication
2 parents 5cfb100 + 237dc9a commit 9667e4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

actionpack/lib/action_controller/metal/http_authentication.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ module Token
424424

425425
module ControllerMethods
426426
# Authenticate using an HTTP Bearer token, or otherwise render an HTTP
427-
# header requesting the client to send a Bearer token.
427+
# header requesting the client to send a Bearer token. For the authentication
428+
# to be considered successful, `login_procedure` should return a non-nil
429+
# value. Typically, the authenticated user is returned.
428430
#
429431
# See ActionController::HttpAuthentication::Token for example usage.
430432
def authenticate_or_request_with_http_token(realm = "Application", message = nil, &login_procedure)

0 commit comments

Comments
 (0)