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

Check token expiration before request #5255

Merged
merged 12 commits into from
Jul 26, 2023
Merged

Conversation

montezdesousa
Copy link
Contributor

@montezdesousa montezdesousa commented Jul 26, 2023

from openbb_terminal.sdk import openbb

expired = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzb21lIjoicGF5bG9hZCIsImV4cCI6MTY5MDM3MDMyMS44NTAzNzJ9.-LDmgL-Y5i4wbGEAu0bn0TybM6GqoX5aAe-VfgiwGVQ"
invalid = "random_token"
valid = <your_token>

openbb.login(token=expired)
openbb.login(token=invalid)
openbb.login(token=valid)

I don't love the print statements, but we are replacing with exceptions in v4 so kept it for now.

@reviewpad reviewpad bot added the feat XS Extra small feature label Jul 26, 2023
@montezdesousa montezdesousa marked this pull request as ready for review July 26, 2023 11:26
Copy link

@reviewpad reviewpad bot left a comment

Choose a reason for hiding this comment

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

The poetry.lock file has been changed. Please update both requirements.txt and requirements-full.txt files

@montezdesousa montezdesousa marked this pull request as draft July 26, 2023 11:59
@montezdesousa montezdesousa marked this pull request as ready for review July 26, 2023 12:30
Copy link

@reviewpad reviewpad bot left a comment

Choose a reason for hiding this comment

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

The poetry.lock file has been changed. Please update both requirements.txt and requirements-full.txt files

reviewpad[bot]
reviewpad bot previously requested changes Jul 26, 2023
Copy link

@reviewpad reviewpad bot left a comment

Choose a reason for hiding this comment

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

The poetry.lock file has been changed. Please update both requirements.txt and requirements-full.txt files

@reviewpad reviewpad bot added feat M Medium T-Shirt size feature and removed feat XS Extra small feature labels Jul 26, 2023
@montezdesousa montezdesousa added the do not merge Label to prevent pull request merge label Jul 26, 2023
@montezdesousa montezdesousa removed the do not merge Label to prevent pull request merge label Jul 26, 2023
@montezdesousa montezdesousa added this pull request to the merge queue Jul 26, 2023
Merged via the queue into develop with commit 41d1359 Jul 26, 2023
14 checks passed
@piiq piiq deleted the hotfix/token_expiration branch August 14, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat M Medium T-Shirt size feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants