Page MenuHomeSoftware Heritage

auth/backends: Adjust TTL for cached OIDC userinfo

Authored by anlambert on Mar 23 2020, 2:30 PM.



This is a simple adjustement for the TTL value of cached OIDC userinfo when using
bearer token authentication.

There is no need to substract 1 from computed TTLs as it can lead to cache userinfo
with a 0 seconds TTL when access token is about to expire and thus send multiple
userinfo requests to the OIDC server on successive calls to the Web API.

I noticed that behavior while testing authentication integration in swh-web-client.

Diff Detail

rDWAPPS Web applications
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.