Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client: Raise error from OAuth 2.0 Bearer errors in WWW-Authenticate #602

Open
xmedeko opened this issue Oct 3, 2018 · 3 comments
Open

Client: Raise error from OAuth 2.0 Bearer errors in WWW-Authenticate #602

xmedeko opened this issue Oct 3, 2018 · 3 comments

Comments

@xmedeko
Copy link

@xmedeko xmedeko commented Oct 3, 2018

Describe the feature

I use requests-oauth to issue requests to a service. If service detects invalid token, it responds with HTTP 401 and header WWW-Authenticate: Bearer error="invalid_token", error_description="The access token expired"

I got the response and have to parse it by myself. I would like the oauthlib to fail with InvalidTokenError instead. (And similarly for other bearer errors in WWW-Authenticate).

See also:

Additional context

OAuth 2.0 client

@JonathanHuot
Copy link
Member

@JonathanHuot JonathanHuot commented Oct 4, 2018

Your suggestion sounds pretty good! Could you do a PR for that ?

@thedrow
Copy link
Collaborator

@thedrow thedrow commented Nov 1, 2018

@xmedeko Ping?

@xmedeko
Copy link
Author

@xmedeko xmedeko commented Nov 1, 2018

I am not so proficient with Python and currently have no time to dive into it. So, if anyone wants to take up the glove and make PR then I'd be happy to CR and test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.