Skip to content

Commit 237dc9a

Browse files
committed
clarify login_procedure's responsibility
1 parent 5cfb100 commit 237dc9a

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)