Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed http token authentication formatting

  • Loading branch information...
commit 595b8bc8f87d4400b1f83882bf079cacd265a9b4 1 parent 07d3466
@qoobaa qoobaa authored
Showing with 13 additions and 8 deletions.
  1. +13 −8 actionpack/lib/action_controller/metal/http_authentication.rb
View
21 actionpack/lib/action_controller/metal/http_authentication.rb
@@ -401,16 +401,21 @@ def request_http_token_authentication(realm = "Application")
end
end
- # If token Authorization header is present, call the login procedure with
- # the present token and options.
+ # If token Authorization header is present, call the login
+ # procedure with the present token and options.
#
- # controller - ActionController::Base instance for the current request.
- # login_procedure - Proc to call if a token is present. The Proc should
- # take 2 arguments:
- # authenticate(controller) { |token, options| ... }
+ # [controller]
+ # ActionController::Base instance for the current request.
#
- # Returns the return value of `&login_procedure` if a token is found.
- # Returns nil if no token is found.
+ # [login_procedure]
+ # Proc to call if a token is present. The Proc should take 2
+ # arguments:
+ #
+ # authenticate(controller) { |token, options| ... }
+ #
+ # Returns the return value of <tt>login_procedure</tt> if a
+ # token is found. Returns <tt>nil</tt> if no token is found.
+
def authenticate(controller, &login_procedure)
token, options = token_and_options(controller.request)
unless token.blank?
Please sign in to comment.
Something went wrong with that request. Please try again.