Skip to content

Commit 76d30b9

Browse files
committed
Rename variable
1 parent 62b501c commit 76d30b9

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

cab-token-generator/java/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactory.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@
4747
import com.google.errorprone.annotations.CanIgnoreReturnValue;
4848
import java.io.IOException;
4949

50+
5051
public final class ClientSideCredentialAccessBoundaryFactory {
5152
private final GoogleCredentials sourceCredential;
5253
private final transient HttpTransportFactory transportFactory;
5354
private final String tokenExchangeEndpoint;
54-
private String acceessBoundarySessionKey;
55-
private AccessToken intermediaryAccessToken;
55+
private String accessBoundarySessionKey;
56+
private AccessToken intermediateAccessToken;
5657

5758
private ClientSideCredentialAccessBoundaryFactory(Builder builder) {
5859
this.transportFactory = builder.transportFactory;
@@ -76,6 +77,7 @@ private void fetchCredentials() throws IOException {
7677
StsTokenExchangeRequest.newBuilder(
7778
sourceAccessToken.getTokenValue(), OAuth2Utils.TOKEN_TYPE_ACCESS_TOKEN)
7879
.setRequestTokenType(OAuth2Utils.TOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN)
80+
7981
.build();
8082

8183
StsRequestHandler handler =
@@ -84,16 +86,16 @@ private void fetchCredentials() throws IOException {
8486
.build();
8587

8688
StsTokenExchangeResponse response = handler.exchangeToken();
87-
this.acceessBoundarySessionKey = response.getAccessBoundarySessionKey();
88-
this.intermediaryAccessToken = response.getAccessToken();
89+
this.accessBoundarySessionKey = response.getAccessBoundarySessionKey();
90+
this.intermediateAccessToken = response.getAccessToken();
8991

9092
// The STS endpoint will only return the expiration time for the intermediary token
9193
// if the original access token represents a service account.
9294
// The intermediary token's expiration time will always match the source credential expiration.
9395
// When no expires_in is returned, we can copy the source credential's expiration time.
9496
if (response.getAccessToken().getExpirationTime() == null) {
9597
if (sourceAccessToken.getExpirationTime() != null) {
96-
this.intermediaryAccessToken =
98+
this.intermediateAccessToken =
9799
new AccessToken(
98100
response.getAccessToken().getTokenValue(), sourceAccessToken.getExpirationTime());
99101
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,7 @@ public void exchangeToken_withAccessBoundarySessionKey() throws IOException {
281281
transport.setReturnAccessBoundarySessionKey(/* returnAccessBoundarySessionKey= */ true);
282282

283283
StsTokenExchangeRequest stsTokenExchangeRequest =
284-
StsTokenExchangeRequest.newBuilder("credential", "subjectTokenType")
285-
.build();
284+
StsTokenExchangeRequest.newBuilder("credential", "subjectTokenType").build();
286285

287286
StsRequestHandler requestHandler =
288287
StsRequestHandler.newBuilder(

0 commit comments

Comments
 (0)