File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
oauth2_http/java/com/google/auth/oauth2 Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -413,13 +413,11 @@ static ImpersonatedCredentials fromJson(
413413 }
414414
415415 GoogleCredentials sourceCredentials ;
416- if (sourceCredentialsType . equals ( GoogleCredentialsInfo .USER_CREDENTIALS .getFileType ())) {
416+ if (GoogleCredentialsInfo .USER_CREDENTIALS .getFileType (). equals ( sourceCredentialsType )) {
417417 sourceCredentials = UserCredentials .fromJson (sourceCredentialsJson , transportFactory );
418- } else if (sourceCredentialsType .equals (
419- GoogleCredentialsInfo .SERVICE_ACCOUNT_CREDENTIALS .getFileType ())) {
418+ } else if (GoogleCredentialsInfo .SERVICE_ACCOUNT_CREDENTIALS .getFileType ().equals (sourceCredentialsType )) {
420419 sourceCredentials =
421420 ServiceAccountCredentials .fromJson (sourceCredentialsJson , transportFactory );
422-
423421 } else {
424422 throw new IOException (
425423 String .format (
@@ -477,8 +475,6 @@ private ImpersonatedCredentials(Builder builder) throws IOException {
477475 this .sourceCredentials = builder .getSourceCredentials ();
478476 this .targetPrincipal = builder .getTargetPrincipal ();
479477 this .delegates = builder .getDelegates ();
480-
481- // Precedence for scopes: 1. User configured scopes 2. Scopes set in the JSON
482478 this .scopes = ImmutableList .copyOf (builder .getScopes ());
483479 this .lifetime = builder .getLifetime ();
484480 this .transportFactory =
You can’t perform that action at this time.
0 commit comments