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

replace access token after revoke #18

Merged
merged 4 commits into from
Oct 3, 2018
Merged

Conversation

paradox70
Copy link
Contributor

After calling revoke_access_token(), access_token revokes and new access_token must be replace.

After calling revoke_access_token(), access_token revokes and new access_token must be replace.
telegraph/api.py Outdated
response = self._telegraph.method('revokeAccessToken')

if replace_token:
self._telegraph.access_token = response.get('access_token')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, I think replace_token arg is not really needed here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you agree with replacing access_token, replacing can be automated.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think we can just replace current token, since it gets invalid anyway

Now, After revoke, new access_token replaced.
telegraph/api.py Outdated
response = self._telegraph.method('revokeAccessToken')

self._telegraph.access_token = response.get('access_token')

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also remove spaces from blank lines?

@python273 python273 merged commit 9456562 into python273:master Oct 3, 2018
@python273
Copy link
Owner

👍

@paradox70
Copy link
Contributor Author

paradox70 commented Oct 3, 2018

Thanks for this simple and great wrapper.

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

Successfully merging this pull request may close these issues.

2 participants