From 236d3f8cef34900642307e05bdf7472c73327c91 Mon Sep 17 00:00:00 2001 From: Shin Fan Date: Thu, 15 Oct 2020 11:12:55 -0700 Subject: [PATCH] fix: remove 1 hour limit for impersonated token Cloud IAM now supports extended 12h lifespan for access token. --- .../java/com/google/auth/oauth2/ImpersonatedCredentials.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java b/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java index a0dcd3512..63ee972ec 100644 --- a/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/ImpersonatedCredentials.java @@ -218,9 +218,6 @@ private ImpersonatedCredentials(Builder builder) { if (this.scopes == null) { throw new IllegalStateException(SCOPE_EMPTY_ERROR); } - if (this.lifetime > ONE_HOUR_IN_SECONDS) { - throw new IllegalStateException(LIFETIME_EXCEEDED_ERROR); - } } @Override