diff --git a/oauth2_http/java/com/google/auth/oauth2/OAuth2Credentials.java b/oauth2_http/java/com/google/auth/oauth2/OAuth2Credentials.java index 94ddeb549..20e1c92e5 100644 --- a/oauth2_http/java/com/google/auth/oauth2/OAuth2Credentials.java +++ b/oauth2_http/java/com/google/auth/oauth2/OAuth2Credentials.java @@ -68,8 +68,8 @@ public class OAuth2Credentials extends Credentials { private static final long serialVersionUID = 4556936364828217687L; - static final Duration DEFAULT_EXPIRATION_MARGIN = Duration.ofMinutes(5); - static final Duration DEFAULT_REFRESH_MARGIN = Duration.ofMinutes(6); + static final Duration DEFAULT_EXPIRATION_MARGIN = Duration.ofMinutes(3); + static final Duration DEFAULT_REFRESH_MARGIN = Duration.ofMinutes(3).plusSeconds(45); private static final ImmutableMap> EMPTY_EXTRA_HEADERS = ImmutableMap.of(); @VisibleForTesting private final Duration expirationMargin;