Comments (6)
Original comment by leah.culver
on 14 Jan 2009 at 9:31
- Added labels: Lib-Python
from oauth.
Right now there's only one kind of OAuth exception for the Python and PHP
libraries.
The spec mentions 400 and 401 errors separately in section 10. Should we
distinguish
between the two?
http://oauth.net/core/1.0/#http_codes
Original comment by leah.culver
on 14 Jan 2009 at 11:23
- Changed title: Separate 400 and 401 exceptions?
- Added labels: Lib-PHP, Type-Enhancement
- Removed labels: Type-Defect
from oauth.
I think it would be very useful differentiate the different types of problems a
service provider can report to the consumer.
As it is at the moment it is difficult to write a server that can correctly
tell a
consumer that it is unauthorised (indicating that it needs to authenticate) vs.
that
it sent an broken request (indicating that the code needs fixing).
On the spec side, it'd be nice if the standardised error reporting options were
a bit
more expressive than choice between two HTTP status codes ...
Original comment by [email protected]
on 16 Jan 2009 at 7:56
from oauth.
Here's a proposed patch (following) my post to the list (pending moderation,
maybe).
Original comment by [email protected]
on 28 Mar 2011 at 8:45
Attachments:
from oauth.
One of the reasons why I never got around to changing all the exceptions to
include a 400/401 flag was that I never got around to deciding which way was
better:
1) Having a error-code like you do (makes testing harder, as PHPUnit can only
test on exception names, not content)
2) Having two different exception classes
I might think that option 2 is preferable and it shouldn't break BC if we just
introduce two new exceptions that both inherit from the current..
Anyways, for future reference - it would be nice if any patch included updates
to the test-case so they are kept up to date :)
Regards
Morten
Original comment by [email protected]
on 29 Mar 2011 at 5:28
from oauth.
Well... the solution I've used makes it quite easy by calling code to test
wether there's an exception return code or not, and address this in a proper
way...
So I don't know about what phpunit supports, but definitely, for the client
code to have only different strings (5 or 6) to be checked by string comparison
is definitely not handy.
Do you have an any such alternative implementation ?
And yes, unit tests would be nice... but I think my time is limited, and we
could wait until such tests are necessary because of some regression I've
introduced along with my patch ? ;)
Original comment by [email protected]
on 6 Apr 2011 at 7:23
from oauth.
Related Issues (20)
- liboauth should use strtok_r instead of strtok to support multithreaded usage
- Objc: NSRangeException when PUT/POST
- [java] split package syndrom
- PHP - oauth_callback is not used in from_consumer_and_token
- PHP Server has case sensitive HTTP headers
- JMeter OAuth Sampler relying on now removed JOrphanUtils method call HOT 2
- Parameter Sort not working in VB.NET Class (and Fix)
- Ouath.php Load balancer issues
- how can i get the token for my http://wholesale.nuorder.com/api/
- Python library nonce generation is insecure
- PHP Fatal error: Cannot redeclare class OAuthException in OAuth.php on line 8
- In C# Code the URL Parameters and their values must be encoded before generating the hash-code
- Problem in OAuthRequest->from_request (PHP lib)
- oauth_problem_advice: Failed to validate signature
- php lib as a server back a server-proxy
- Code review request
- java: net.oauth.OAuthMessage uses unsafe method for nonce generation HOT 2
- Code review request
- Patch for /code/javascript/sha1.js
- Patch for /code/c/liboauth/src/oauth_http.c
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oauth.