Skip to content

Commit 04e8056

Browse files
committed
update frompkcs8
1 parent c3a259f commit 04e8056

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

oauth2_http/java/com/google/auth/oauth2/ServiceAccountJwtAccessCredentials.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private ServiceAccountJwtAccessCredentials(
112112
privateKeyId,
113113
null,
114114
null,
115-
Credentials.GOOGLE_DEFAULT_UNIVERSE);
115+
null);
116116
}
117117

118118
/**
@@ -123,8 +123,7 @@ private ServiceAccountJwtAccessCredentials(
123123
* @param privateKey RSA private key object for the service account.
124124
* @param privateKeyId Private key identifier for the service account. May be null.
125125
* @param defaultAudience Audience to use if not provided by transport. May be null.
126-
* @param universeDomain universe domain in the format some-domain.xyz. By default, returns
127-
* googleapis.com.
126+
* @param universeDomain universe domain in the format some-domain.xyz.
128127
*/
129128
private ServiceAccountJwtAccessCredentials(
130129
String clientId,
@@ -235,7 +234,7 @@ public static ServiceAccountJwtAccessCredentials fromPkcs8(
235234
privateKeyId,
236235
defaultAudience,
237236
null,
238-
Credentials.GOOGLE_DEFAULT_UNIVERSE);
237+
null);
239238
}
240239

241240
static ServiceAccountJwtAccessCredentials fromPkcs8(

oauth2_http/javatests/com/google/auth/oauth2/ServiceAccountJwtAccessCredentialsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ public void fromJSON_UniverseDomainSet() throws IOException {
875875
}
876876

877877
@Test
878-
public void fromPkcs8_DefaultUniverseDomain() throws IOException {
878+
public void fromPkcs8_NoUniverseDomain() throws IOException {
879879
ServiceAccountJwtAccessCredentials credentials =
880880
ServiceAccountJwtAccessCredentials.fromPkcs8(
881881
SA_CLIENT_ID, SA_CLIENT_EMAIL, SA_PRIVATE_KEY_PKCS8, SA_PRIVATE_KEY_ID);
@@ -884,7 +884,7 @@ public void fromPkcs8_DefaultUniverseDomain() throws IOException {
884884
assertEquals(
885885
OAuth2Utils.privateKeyFromPkcs8(SA_PRIVATE_KEY_PKCS8), credentials.getPrivateKey());
886886
assertNull(credentials.getQuotaProjectId());
887-
assertEquals(GOOGLE_DEFAULT_UNIVERSE, credentials.getUniverseDomain());
887+
assertNull(credentials.getUniverseDomain());
888888
}
889889

890890
@Test

0 commit comments

Comments
 (0)