Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Try to revoke token with POST when getting a 405 #662

Merged
merged 1 commit into from
Oct 6, 2016
Merged

Try to revoke token with POST when getting a 405 #662

merged 1 commit into from
Oct 6, 2016

Conversation

LiraNuna
Copy link
Contributor

@LiraNuna LiraNuna commented Oct 6, 2016

The OAuth spec does not specify the HTTP verb explicitly but it does hint that POST is the correct verb.
When using the client library with other OAuth services that implement revocation token via a POST, revoking the token will fail.

This commit adds the ability to re-try the revocation process if we get a 405 with the POST verb.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@LiraNuna
Copy link
Contributor Author

LiraNuna commented Oct 6, 2016

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels Oct 6, 2016
@theacodes
Copy link
Contributor

theacodes commented Oct 6, 2016

Hi @LiraNuna! This change looks good, but you'll need to add another test to cover this so that travis passes.

@theacodes theacodes self-assigned this Oct 6, 2016
@LiraNuna
Copy link
Contributor Author

LiraNuna commented Oct 6, 2016

@jonparrott Thanks for your response! Just noticed the failure as well - I'll get the tests soon.

@theacodes
Copy link
Contributor

Sounds good, just ping me when you're ready.

(Also, small world - I remember you from NDS dev stuff. 😄 )

The OAuth spec does not specify the HTTP verb explicitly but it does hint that POST is the correct verb.
When using the client library with other OAuth services that implement revocation token via a POST, revoking the token will fail.

This commit adds the ability to re-try the revocation process if we get a 405 with the POST verb.
@LiraNuna
Copy link
Contributor Author

LiraNuna commented Oct 6, 2016

@jonparrott Tests fixed - I had to reshuffle stuff around to get the desired behavior correctly.

(Small world!)

@theacodes theacodes merged commit 999de3a into googleapis:master Oct 6, 2016
@theacodes
Copy link
Contributor

Thanks for the contribution, @LiraNuna!

@LiraNuna
Copy link
Contributor Author

LiraNuna commented Oct 6, 2016

@jonparrott how soon should I expect this to show up on PyPI? I've noticed the current code is a bit different than 3.0.0

@theacodes
Copy link
Contributor

I'm not sure.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants