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

Properly clear access token #364

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix clear_access_token
haggrip committed Jul 13, 2023
commit d940a9e9c15508beece565b09de2d3b0e27eebb9
1 change: 1 addition & 0 deletions okta/api_response.py
Original file line number Diff line number Diff line change
@@ -176,5 +176,6 @@ async def get_next(self):
next_response = OktaAPIResponse(
self._request_executor, req, res_details, resp_body)
self._next = next_response._next
self._resp_headers = res_details.headers
# yield next page
yield (next_response.get_body(), None)
3 changes: 3 additions & 0 deletions okta/oauth.py
Original file line number Diff line number Diff line change
@@ -90,3 +90,6 @@ def clear_access_token(self):
Clear currently used OAuth access token, probably expired
"""
self._access_token = None
self._request_executor._oauth.clear_access_token()
self._request_executor._cache.delete("OKTA_ACCESS_TOKEN")
self._request_executor._default_headers.pop("Authorization", None)