Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

HttpAuthentication::Basic gives wrong information on example on how to authenticate

#5246

http://api.rails.info/classes/ActionController/HttpAuthentication/B...

 In your integration tests, you can do something like this:
   def test_access_granted_from_xml
     get(
       "/notes/1.xml", nil,
       :authorization => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password)
     )

     assert_equal 200, status
   end

This doesn't work. It should read:

 get(
  "/notes/1.xml", nil,
  'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(users(:dhh).name, users(:dhh).password)
 )

Reported by eydaimon · July 30th, 2010 @ 05:51 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. Rohit Arondekar
    Rohit Arondekar
    • State changed from new to resolved
    • Importance changed from to Low

    Fixed here: http://github.com/lifo/docrails/commit/48d85a61bc0918d6ea1bad574c96...

    The change will be merged with the main Rails repo soon. Thank you for reporting the issue! :)

    July 30th, 2010 @ 10:13 AM