views:

333

answers:

3

Duplicate: this must be a duplicate of one of the questions that come up in the following search: http://stackoverflow.com/questions/tagged/rest+authentication. Please close it as a duplicate if you agree, and add any answers to one of the other questions.


What is the most RESTful form of authentication? What websites use it? (so I can go look at the documentation).

Looking at some APIs that claim to be REST are really POX
(ex. Remember the Milk - http://www.rememberthemilk.com/services/api/methods/)

+1  A: 

I don't know if this is the 'most RESTful' form, but Amazon's S3 uses an authentication method which is documented here. Each request is signed, so there is no session to track on the backend, but you can still securely verify what user issued the request.

ryanday
+1. This sort of makes sense. Is there a good hashing/crypto JavaScript lib that you'd recommend?
tyndall
Not that I've used in production. I tried to go with this method for a project at work, but we ended up using Flex/amfphp instead. Sorry!
ryanday
+1  A: 

The most RESTful authentication method is probably HTTP Basic. Because it has some significant weaknesses (replay attacks), most APIs tend to shy away from it.

Joe Liversedge
Good point. +1.
tyndall
A: 

Open Sourcery has a well-thought-out article on RESTful authentication. Sounds like there are no awesome solutions right now beyond simple user/pass auth over SSL and then keeping auth info in subsequent request headers.

jtsnake