pelle / oauth-plugin

Rails plugin for OAuth
http://stakeventures.com/articles/2009/07/21/consuming-oauth-intelligently-in-rails
MIT License
716 stars 216 forks source link

HTTP 401 vs 403 for Invalid OAuth Request #24

Open micahwedemeyer opened 13 years ago

micahwedemeyer commented 13 years ago

The default response value for the invalid OAuth request is 401. Looking at the HTTP specs for response codes (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html), it seems that 403 Forbidden is more appropriate. 401 indicates that the client can try again using HTTP Authorization, which obviously isn't allowed in OAuth requests.

Not a big deal, and I could be wrong. Just thought I'd bring it up for discussion.