Skip to content

Commit

Permalink
set config in constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmehta19 committed Sep 26, 2024
1 parent bce602e commit 32caef5
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions oauth2_http/java/com/google/auth/oauth2/S2A.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,16 @@ public S2A() {}

public void setHttpTransportFactory(HttpTransportFactory tf) {
this.transportFactory = tf;
this.config = getS2AConfigFromMDS();
}

/** @return the mTLS S2A Address from the mTLS config. */
public synchronized String getMtlsS2AAddress() {
if (config == null) {
config = getS2AConfigFromMDS();
}
public String getMtlsS2AAddress() {
return config.getMtlsAddress();
}

/** @return the plaintext S2A Address from the mTLS config. */
public synchronized String getPlaintextS2AAddress() {
if (config == null) {
config = getS2AConfigFromMDS();
}
public String getPlaintextS2AAddress() {
return config.getPlaintextAddress();
}

Expand Down

0 comments on commit 32caef5

Please sign in to comment.