Files
ocis/services/proxy/pkg
David WalterandClaude Opus 4.8 bfd0c8a4ea fix(proxy): re-verify access token when cached userinfo has expired (#12414)
getClaims rejected a request with jwt.ErrTokenExpired whenever the cached
userinfo entry's expiry had passed, instead of re-verifying the access token.
The cached "exp" is not always the real token expiry: for opaque access tokens
extractExpiration falls back to the configured cache TTL. A still-valid token
could therefore be rejected merely because its cache entry aged out, producing
spurious logouts (most visible under frequent PROPFIND requests).

getClaims now treats an expired cache entry as a cache miss and falls through to
VerifyAccessToken/UserInfo re-verification. A genuinely expired or invalid token
is still rejected by that re-verification, so authentication is not weakened.

The test's mock now returns a fresh claims map per call, mirroring the real
client, so the suite is race-clean (getClaims caches asynchronously).

Signed-off-by: David Walter <david.walter@kiteworks.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 11:25:50 +02:00
..
2026-06-19 10:43:41 +02:00
2024-10-01 10:41:24 +02:00
2026-06-19 10:43:41 +02:00
2024-08-06 13:33:18 +02:00
2024-10-17 19:03:14 +02:00
2026-02-10 16:27:52 +01:00
2026-06-19 10:43:41 +02:00