Skip to main content
I suggest replacing the [api] tag with [restapi]. The [api] tag-wiki - https://stackoverflow.com/tags/api/info - explicitly says "DO NOT USE". Also see the [restapi] tag-wiki - https://stackoverflow.com/tags/restapi/info, "Use this tag if your question involves a REST API you are building or using".
Link
Question Protected by Ashwini Chaudhary
Notice removed Authoritative reference needed by Scott Roepnack
Bounty Ended with Akim's answer chosen by Scott Roepnack
Notice added Authoritative reference needed by Scott Roepnack
Bounty Started worth 50 reputation by Scott Roepnack
updated wiki tags
Link
Scott Roepnack
  • 2.7k
  • 5
  • 22
  • 36
Rollback to Revision 1
Source Link
Scott Roepnack
  • 2.7k
  • 5
  • 22
  • 36

I am creating a REST api, closely following apigee suggestions, using nouns not verbs, api version baked into the url, two api paths per collection, GET POST PUT DELETE usage, etc.

I am working on the login system, but unsure of the proper REST way to login users. I am not working on security at this point, just the login pattern or flow. (Later we will be adding 2 step oAuth, with an HMAC, etc)

Possible Options

  • A POST to something like https://api...com/v1/login.json
  • A PUT to something like https://api...com/v1/users.json
  • Something I have not though of...

What is the proper RESTREST style for logging in users?

I am creating a REST api, closely following apigee suggestions, using nouns not verbs, api version baked into the url, two api paths per collection, GET POST PUT DELETE usage, etc.

I am working on the login system, but unsure of the proper REST way to login users. I am not working on security at this point, just the login pattern or flow. (Later we will be adding 2 step oAuth, with an HMAC, etc)

Possible Options

  • A POST to something like https://api...com/v1/login.json
  • A PUT to something like https://api...com/v1/users.json
  • Something I have not though of...

What is the proper REST style for logging in users?

I am creating a REST api, closely following apigee suggestions, using nouns not verbs, api version baked into the url, two api paths per collection, GET POST PUT DELETE usage, etc.

I am working on the login system, but unsure of the proper REST way to login users. I am not working on security at this point, just the login pattern or flow. (Later we will be adding 2 step oAuth, with an HMAC, etc)

Possible Options

  • A POST to something like https://api...com/v1/login.json
  • A PUT to something like https://api...com/v1/users.json
  • Something I have not though of...

What is the proper REST style for logging in users?

highlighted code
Source Link
Scott Roepnack
  • 2.7k
  • 5
  • 22
  • 36
Loading
Source Link
Scott Roepnack
  • 2.7k
  • 5
  • 22
  • 36
Loading