News for hackers. Stuff that matters.
Re:TDD your API by ryanfitz on Friday May 16, 2014 @05:24PM (#7758000)
I recently created a login flow for a RESTful API. The solution I went with was instead of thinking of it as a high level activity such as login, what I was really doing was creating auth tokens to then be used in the Authorization header in subsequent requests.

I created a /tokens endpoint, where I POST the auth credentials and in return I get back a newly generated auth token. In my opinion this is a nice RESTFul solution.

Re:TDD your API by steveklabnik on Friday May 16, 2014 @06:49PM (#7758361)
This is actually exactly how we model API tokens: https://docs.balancedpayments.com/1.1/api/api-keys/#create-a...