Skip to content

Add Support for Short-Lived Tokens #183

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

Merged
merged 3 commits into from
Mar 30, 2020
Merged

Add Support for Short-Lived Tokens #183

merged 3 commits into from
Mar 30, 2020

Conversation

rogebrd
Copy link
Contributor

@rogebrd rogebrd commented Mar 25, 2020

Add token_access_type to oauth flow
- Legacy - default - the current long lived token flow
- Online - requests only a short-lived access token
- Offline - requests both a short-lived access token and a refresh token
Add refresh check to each API call
Add refresh check on client creation

Add token_access_type to oauth flow
	- Legacy - default - the current long lived token flow
	- Online - requests only a short-lived access token
	- Offline - requests both a short-lived access token and a refresh token
Add refresh check to each API call
Add refresh check on client creation
@rogebrd rogebrd requested a review from jiuyangzhao March 25, 2020 02:14
@@ -191,9 +210,15 @@ def __init__(self,

self._timeout = timeout

self._check_and_refresh_access_token()

Choose a reason for hiding this comment

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

Normally we want to avoid network call in constructor. I think its OK to not validate it here. (Like we don't validate if oauth2 token to server)

@rogebrd rogebrd merged commit 82a0efa into master Mar 30, 2020
@rogebrd rogebrd deleted the short-lived-tokens branch March 30, 2020 17:35
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