Why is authenticate_with_http_basic undefined?

Hi,

i used the rick olson’s restful_authentication plugin

rails 1.2.6

i wanted to check for authenticated user so i wrote this in my
application.rb

Filters

before_filter :authenticate

Sets @authenticated_user if the user provides valid

credentials. May be used to deny access or customise the view

def authenticate
@authenticated_user = nil
authenticate_with_http_basic do |user, pass|

  @authenticated_user = User.authenticate(user, pass)
end

return true

end

#Filter for actions that require authentication. Unless client
authenticated

as some user, takes over the request and sends a response code of

def must_authenticate
if @authenticated_user && (@user_is_viewing_themselves != false)
return true
else
request_http_basic_authentication
return false
end
end

I get a NOMETHODERROR

undefined method `request_http_basic_authentication’ for
#OrdersController:0x478cc5c

when i tried this url
http://localhost:3001/v1/users/permalink_for_user_1/orders

if i remove the filter , etc i can use this link which is of course
bad cause i also can see teh data when i am not the authenticated
user.

Please help.

Thank you

i used the rick olson’s restful_authentication plugin

rails 1.2.6

I’m pretty sure that authenticate_with_http_basic is a rails 2.0
feature.

Check the docs/release notes…