Skip to content

Commit

Permalink
Update oauth2_http/java/com/google/auth/oauth2/ExternalAccountCredent…
Browse files Browse the repository at this point in the history
…ials.java

Co-authored-by: Leo <[email protected]>
  • Loading branch information
aeitzman and lsirac authored Apr 9, 2024
1 parent d0fc130 commit 24422f5
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,16 @@ protected ExternalAccountCredentials(ExternalAccountCredentials.Builder builder)
this.clientId = builder.clientId;
this.clientSecret = builder.clientSecret;

if (builder.tokenUrl == null) {
this.tokenUrl = builder.tokenUrl;
if (this.tokenUrl == null) {
try {
this.tokenUrl = DEFAULT_TOKEN_URL.replace("{UNIVERSE_DOMAIN}", this.getUniverseDomain());
} catch (IOException e) {
// Throwing an IOException would be a breaking change, so wrap it here.
// This should not happen for this credential type.
throw new IllegalStateException(
"Error occurred when attempting to retrieve universe domain.", e);
}
} else {
this.tokenUrl = builder.tokenUrl;
}

this.scopes =
Expand Down

0 comments on commit 24422f5

Please sign in to comment.