Displaying 1 result from an estimated 1 matches for "render_ok".
Did you mean:
render_on
2009 Jan 13
0
optional authentication and HTTP Basic
...acked around it was to create an action that looks like
this:
app/controllers/sessions_controller.rb
def challenge
authenticate_or_request_with_http_basic APP_NAME do |login,
password|
@user = User.authenticate(login, password)
end
if @user
self.current_user = @user
render_ok
end
end
so browser clients (including the problematic desktop client) can GET
http://user:pass-hcDgGtZH8xNBDgjK7y7TUQ@public.gmane.org/sessions/challenge to do explicit HTTP
basic auth.
Is there a better way to do this?
Thanks,
Ian
--~--~---------~--~----~------------~-------~--~----~
You...