This project is archived and is in readonly mode.

#3335 ✓committed
Pivotal Labs

HTTP Digest authentication for ActiveResource

Reported by Pivotal Labs | October 5th, 2009 @ 10:02 PM

ActiveResource supports HTTP Basic authentication, but not HTTP Digest authentication, which poses something of a problem when consuming APIs that expect the client to provide Digest credentials (as currently supported by Rails). This patch allows an ActiveResource class to specify that it should provide credentials to the server as a digest. As an example:

class Foo < ActiveResource
self.user = 'fred' self.password = 'password' self.auth_type = :digest end

Any auth_type other than 'digest' or :digest will default back to Basic authentication. If the class doesn't specify credentials it still falls back to no authentication. Tests included.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages