Skip to content

Commit a64cebd

Browse files
committed
Fix dependency and formatting issues.
1 parent bd01ab3 commit a64cebd

File tree

6 files changed

+42
-20
lines changed

6 files changed

+42
-20
lines changed

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

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

50-
5150
public final class ClientSideCredentialAccessBoundaryFactory {
5251
private final GoogleCredentials sourceCredential;
5352
private final transient HttpTransportFactory transportFactory;
@@ -77,7 +76,6 @@ private void fetchCredentials() throws IOException {
7776
StsTokenExchangeRequest.newBuilder(
7877
sourceAccessToken.getTokenValue(), OAuth2Utils.TOKEN_TYPE_ACCESS_TOKEN)
7978
.setRequestTokenType(OAuth2Utils.TOKEN_TYPE_ACCESS_BOUNDARY_INTERMEDIARY_TOKEN)
80-
8179
.build();
8280

8381
StsRequestHandler handler =

cab-token-generator/pom.xml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,42 @@
66
<parent>
77
<groupId>com.google.auth</groupId>
88
<artifactId>google-auth-library-parent</artifactId>
9-
<version>1.29.1-SNAPSHOT</version><!-- {x-version-update:google-auth-library-parent:current} -->
9+
<version>1.29.1-SNAPSHOT
10+
</version><!-- {x-version-update:google-auth-library-parent:current} -->
1011
</parent>
1112

1213
<artifactId>cab-token-generator</artifactId>
1314
<name>Google Auth Library for Java - Cab Token Generator</name>
1415

16+
<build>
17+
<sourceDirectory>java</sourceDirectory>
18+
</build>
1519
<dependencies>
1620
<dependency>
1721
<groupId>com.google.auth</groupId>
1822
<artifactId>google-auth-library-oauth2-http</artifactId>
1923
<version>${project.version}</version>
2024
</dependency>
25+
<dependency>
26+
<groupId>com.google.auth</groupId>
27+
<artifactId>google-auth-library-credentials</artifactId>
28+
<version>1.29.1-SNAPSHOT</version>
29+
</dependency>
30+
<dependency>
31+
<groupId>com.google.http-client</groupId>
32+
<artifactId>google-http-client</artifactId>
33+
<version>1.45.0</version>
34+
</dependency>
35+
<dependency>
36+
<groupId>com.google.errorprone</groupId>
37+
<artifactId>error_prone_annotations</artifactId>
38+
<version>2.35.1</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>com.google.guava</groupId>
42+
<artifactId>guava</artifactId>
43+
<version>33.3.1-android</version>
44+
</dependency>
2145
</dependencies>
2246

2347
</project>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,8 @@ protected static <T> T newInstance(String className) throws IOException, ClassNo
490490
* @param clazz The class of the service provider to load.
491491
* @param defaultInstance The default instance to return if no service providers are found.
492492
* @param <T> The type of the service provider.
493-
* @return The first service provider from the service loader, or the {@code defaultInstance} if no
494-
* service providers are found.
493+
* @return The first service provider from the service loader, or the {@code defaultInstance} if
494+
* no service providers are found.
495495
*/
496496
public static <T> T getFromServiceLoader(Class<? extends T> clazz, T defaultInstance) {
497497
return Iterables.getFirst(ServiceLoader.load(clazz), defaultInstance);

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@
5151
import javax.annotation.Nullable;
5252

5353
/**
54-
* Implements the OAuth 2.0 token exchange based on
55-
* <a href="https://tools.ietf.org/html/rfc8693">RFC 8693</a>.
54+
* Implements the OAuth 2.0 token exchange based on <a
55+
* href="https://tools.ietf.org/html/rfc8693">RFC 8693</a>.
5656
*
57-
* <p>This class handles the process of exchanging one type of token for another using the
58-
* Security Token Service (STS). It constructs and sends the token exchange request to the STS
59-
* endpoint and parses the response to create an {@link StsTokenExchangeResponse} object.
57+
* <p>This class handles the process of exchanging one type of token for another using the Security
58+
* Token Service (STS). It constructs and sends the token exchange request to the STS endpoint and
59+
* parses the response to create an {@link StsTokenExchangeResponse} object.
6060
*
6161
* <p>Use the {@link #newBuilder(String, StsTokenExchangeRequest, HttpRequestFactory)} method to
6262
* create a new builder for constructing an instance of this class.

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
import javax.annotation.Nullable;
3939

4040
/**
41-
* Represents an OAuth 2.0 token exchange request, as defined in
42-
* <a href="https://tools.ietf.org/html/rfc8693#section-2.1">RFC 8693, Section 2.1</a>.
41+
* Represents an OAuth 2.0 token exchange request, as defined in <a
42+
* href="https://tools.ietf.org/html/rfc8693#section-2.1">RFC 8693, Section 2.1</a>.
4343
*
44-
* <p>This class encapsulates the parameters necessary for making a token exchange request to
45-
* Google Security Token Service (STS). It includes the subject token, subject token type, optional
44+
* <p>This class encapsulates the parameters necessary for making a token exchange request to Google
45+
* Security Token Service (STS). It includes the subject token, subject token type, optional
4646
* parameters like acting party, scopes, resource, audience, requested token type, and internal
4747
* options.
4848
*
@@ -84,10 +84,10 @@ private StsTokenExchangeRequest(
8484
/**
8585
* Returns a new {@link StsTokenExchangeRequest.Builder} instance.
8686
*
87-
* @param subjectToken The token being exchanged. This represents the credentials being used
88-
* to authorize the token exchange request.
89-
* @param subjectTokenType The type of the {@code subjectToken}. For example,
90-
* {@link OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN}.
87+
* @param subjectToken The token being exchanged. This represents the credentials being used to
88+
* authorize the token exchange request.
89+
* @param subjectTokenType The type of the {@code subjectToken}. For example, {@link
90+
* OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN}.
9191
* @return A new builder for creating {@code StsTokenExchangeRequest} instances.
9292
*/
9393
public static Builder newBuilder(String subjectToken, String subjectTokenType) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ private StsTokenExchangeResponse(
8686
* Returns a new {@link StsTokenExchangeResponse.Builder} instance.
8787
*
8888
* @param accessToken The exchanged access token.
89-
* @param issuedTokenType The issued token type. For example,
90-
* {@link OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN}.
89+
* @param issuedTokenType The issued token type. For example, {@link
90+
* OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN}.
9191
* @param tokenType The token type (e.g., "Bearer").
9292
* @return A new builder for creating {@link StsTokenExchangeResponse} instances.
9393
*/

0 commit comments

Comments
 (0)