-
Notifications
You must be signed in to change notification settings - Fork 47
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
Conversation
After calling revoke_access_token(), access_token revokes and new access_token must be replace.
replace new access token
telegraph/api.py
Outdated
response = self._telegraph.method('revokeAccessToken') | ||
|
||
if replace_token: | ||
self._telegraph.access_token = response.get('access_token') |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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') | ||
|
There was a problem hiding this comment.
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?
👍 |
Thanks for this simple and great wrapper. |
After calling revoke_access_token(), access_token revokes and new access_token must be replace.