Skip to content

Commit 7f11d13

Browse files
author
Ashok Vengala
committed
bug/OTF-4041: dd support for non-JWT OAuth2 tokens in OAuth2Util
- Added IllegalArgumentException to catch block in expiresAtMillis method - Enables compatibility with BigLake API which uses opaque OAuth2 access tokens - Maintains backward compatibility with existing JWT-based token systems - Returns null for non-JWT tokens, allowing expiration fallback to properties
1 parent f38c341 commit 7f11d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/org/apache/iceberg/rest/auth/OAuth2Util.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ static Long expiresAtMillis(String token) {
441441
JsonNode node;
442442
try {
443443
node = JsonUtil.mapper().readTree(Base64.getUrlDecoder().decode(parts.get(1)));
444-
} catch (IOException e) {
444+
} catch (IOException | IllegalArgumentException e) {
445445
return null;
446446
}
447447

0 commit comments

Comments
 (0)