python-domino
python-domino copied to clipboard
Check for additional valid tokens, in case the primary bearer auth token is expired
For use cases like scheduled tasks, fallback to API Key since the default auth method may have become invalid/expired.
We currently suggest to use unsetenv, i.e:
os.unsetenv('DOMINO_TOKEN_FILE')
in the python code to avoid a potentially expired Bearer Auth token file, and fallback to API Key.
We should be able to test for the expired bearer auth and walk through the remaining authentication methods instead of trying to apply the expired auth - causing 401/403 errors.
This may have improved with domino.authenticate already, but we still have some users on the older version.