clearance_http_auth icon indicating copy to clipboard operation
clearance_http_auth copied to clipboard

Changes for Rails 3.2 and Clearance 0.16

Open jgarth opened this issue 13 years ago • 2 comments

Hey karmi,

I took the liberty to make some changes to get this much appreciated middleware to work with Rails 3.2 and the newest clearance gem. I removed the current_user override, as it is no longer necessary and made the middleware use clearance_session.sign_in instead of manipulating env directly. Also, the targeting_api? call will take any HTTP Accept-header into consideration, so unauthorized API calls made with just this header will still return 401 instead of redirecting to a sign in page.

I've also taken the liberty to update the FactoryGirl syntax used in tests and made sure the tests pass again.

If you're satisfied with the changes, feel free to pull them in.

jgarth avatar Jun 06 '12 10:06 jgarth

Really hoping this pull gets accepted soon :+1:

jwarchol avatar Jul 12 '12 15:07 jwarchol

@jgarth Is this code still relevant for the 1.0.0-rc version of clearance?

jhny avatar Mar 11 '13 09:03 jhny