def authenticate
@current_user = authenticate_or_request_with_http_basic { |u, p|
User.authenticate(u, p) }
end
Use as a before filter.
On Jul 16, 11:18 am, Wouter <[email protected]> wrote:
> Can you post your code how you fixed it please!
> I am using also restful authentication and want to provide basic
> authenticaton for xml!
>
> Thank you
>
> Wouter
>
> On 18 jun, 19:06, Matt Jones <[email protected]> wrote:
>
>
>
> > There's already support for basic auth in restful-authentication; it
> > only gets used by default for (off the top of my head) JSON and XML
> > formatted requests. The support is pretty simple - take a look at (in
> > restful_auth) AuthenticatedSystem#access_denied, and also the core
> > docs for ActionController::HttpAuthentication.
>
> > --Matt Jones
>
> > On Jun 17, 9:59 pm, Andrew <[email protected]> wrote:
>
> > > I'm developing an API for my site, and I'm wondering how I can make it
> > > so requests require basic access authentication (like in Twitter's API
> > > for example)? I'm using restful-authentication on Rails 2.3.2. Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---