python-domino icon indicating copy to clipboard operation
python-domino copied to clipboard

Check for additional valid tokens, in case the primary bearer auth token is expired

Open ddl-bjornr opened this issue 4 years ago • 0 comments

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.

ddl-bjornr avatar Aug 05 '21 10:08 ddl-bjornr