vlad-lyutenko opened a new pull request, #18910:
URL: https://github.com/apache/iceberg/pull/18910

   `AuthSession.fromTokenResponse()` and `refresh()` set the session's 
`expiresAtMillis` only from the `exp` claim of a JWT access token; `expires_in` 
from the token response was used to schedule the background refresh but never 
stored on the session. With authorization servers that issue opaque (non-JWT) 
access tokens, `AuthSession.expiresAtMillis()` is therefore always `null`, so 
the expired-token branches in `refreshCurrentToken()` and `fromAccessToken()` 
never engage. This falls back to `startTime + expires_in` when the token is not 
a JWT (RFC 6749 ยง5.1), in both places. 
`testCatalogTokenRefreshFailsAndUsesCredentialForRefresh` drops from two 
token-exchange attempts to one: with the expiry known, the retry sees the 1 s 
token as expired and goes straight to the credential flow, as that branch 
intends.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to