You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both a static access_token and developer_token are present, a refresh() is incorrectly triggered when the access_token expires.
Expected behavior
Defining a static access_token should take precedence over a developer_token and suppress auto_refresh behavior.
Current behavior
When both a static access_token and developer_token are present, a refresh() is incorrectly triggered when the access_token expires.
Possible solution
The general approach would be to add a check for existence of a static access_token if a developer_token is present. If the access_token exists, the refresh() should be bypassed. The result should then be a 401 authentication error.
Steps to reproduce
Export both a PAN_DEVELOPER_TOKEN and PAN_ACCESS_TOKEN
Wait for the access_token to expire.
Attempt a refresh() and observe the refresh attempt.
Screenshots
Context
Your Environment
Version used: alpha8
Environment name and version (e.g. Chrome 59, node.js 5.4, python 3.7.3):
Operating System and version (desktop or mobile):
Link to your project:
The text was updated successfully, but these errors were encountered:
Currently, auto_refresh=False is the only supported means to disabling the refresh behavior altogether. Automatically disabling auto_refresh, if a static access_token is passed, will require a bit more refactoring.
For now, I'll issue the fix for bypassing the developer_token refresh if a static access_token is detected and will revisit disabling auto_refresh in the future.
sserrata
added a commit
to sserrata/pan-cortex-data-lake-python
that referenced
this issue
Apr 3, 2020
* Update clientType and clientVersion, fixes#149
* Reduce number of times json() property is called, fixes#148
* Check if static access_token exists before developer token refresh, fixes#147
* Bump version to alpha9
Describe the bug
When both a static
access_token
anddeveloper_token
are present, arefresh()
is incorrectly triggered when theaccess_token
expires.Expected behavior
Defining a static
access_token
should take precedence over adeveloper_token
and suppressauto_refresh
behavior.Current behavior
When both a static
access_token
anddeveloper_token
are present, arefresh()
is incorrectly triggered when theaccess_token
expires.Possible solution
The general approach would be to add a check for existence of a static
access_token
if adeveloper_token
is present. If theaccess_token
exists, therefresh()
should be bypassed. The result should then be a401
authentication error.Steps to reproduce
PAN_DEVELOPER_TOKEN
andPAN_ACCESS_TOKEN
access_token
to expire.refresh()
and observe the refresh attempt.Screenshots
Context
Your Environment
The text was updated successfully, but these errors were encountered: