Skip to content

Commit 63ed03b

Browse files
committed
docs(auth): add @deprecated replacements and Builder.setAccessToken links
1 parent 6ecc9c8 commit 63ed03b

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

‎google-auth-library-java/oauth2_http/java/com/google/auth/oauth2/GoogleCredentials.java‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -428,14 +428,17 @@ protected GoogleCredentials() {
428428
/**
429429
* Constructor with an explicit access token and quotaProjectId.
430430
*
431-
* <p>Deprecated, please use the {@link GoogleCredentials#GoogleCredentials(Builder)} constructor
432-
* whenever possible. Defaults to {@link Credentials#GOOGLE_DEFAULT_UNIVERSE} ({@code
433-
* googleapis.com}). Callers with an access token for a non-default universe domain should use
434-
* {@link #create(String, AccessToken)} (or {@link #newBuilder()} with {@link
435-
* Builder#setUniverseDomain(String)}) to specify the universe domain explicitly.
431+
* <p>Defaults to {@link Credentials#GOOGLE_DEFAULT_UNIVERSE} ({@code googleapis.com}). Callers
432+
* with an access token for a non-default universe domain should use {@link #create(String,
433+
* AccessToken)} (or {@link #newBuilder()} with {@link Builder#setAccessToken(AccessToken)} and
434+
* {@link Builder#setUniverseDomain(String)}) to specify the universe domain explicitly.
436435
*
437436
* @param accessToken initial or temporary access token
438437
* @param quotaProjectId a quotaProjectId, a project id to be used for billing purposes
438+
* @deprecated Use {@link #GoogleCredentials(Builder)} for subclasses, or {@link #newBuilder()}
439+
* with {@link Builder#setAccessToken(AccessToken)} and {@link
440+
* Builder#setQuotaProjectId(String)} (and {@link Builder#setUniverseDomain(String)} for a
441+
* non-default universe domain).
439442
*/
440443
@Deprecated
441444
protected GoogleCredentials(@Nullable AccessToken accessToken, @Nullable String quotaProjectId) {
@@ -453,6 +456,8 @@ protected GoogleCredentials(@Nullable AccessToken accessToken, @Nullable String
453456
* AccessToken)} to specify the universe domain explicitly.
454457
*
455458
* @param accessToken initial or temporary access token
459+
* @deprecated Use {@link #create(AccessToken)} for {@code googleapis.com}, or {@link
460+
* #create(String, AccessToken)} to specify a universe domain explicitly.
456461
*/
457462
@Deprecated
458463
public GoogleCredentials(AccessToken accessToken) {
@@ -483,13 +488,15 @@ protected GoogleCredentials(Builder builder) {
483488
/**
484489
* Constructor with explicit access token and refresh margins.
485490
*
486-
* <p>Deprecated, please use the {@link GoogleCredentials#GoogleCredentials(Builder)} constructor
487-
* whenever possible. Defaults to {@link Credentials#GOOGLE_DEFAULT_UNIVERSE} ({@code
488-
* googleapis.com}). Callers with an access token for a non-default universe domain should use
489-
* {@link #create(String, AccessToken)} (or {@link #newBuilder()} with {@link
490-
* Builder#setUniverseDomain(String)}) to specify the universe domain explicitly.
491+
* <p>Defaults to {@link Credentials#GOOGLE_DEFAULT_UNIVERSE} ({@code googleapis.com}). Callers
492+
* with an access token for a non-default universe domain should use {@link #create(String,
493+
* AccessToken)} (or {@link #newBuilder()} with {@link Builder#setAccessToken(AccessToken)} and
494+
* {@link Builder#setUniverseDomain(String)}) to specify the universe domain explicitly.
491495
*
492496
* @param accessToken initial or temporary access token
497+
* @deprecated Use {@link #GoogleCredentials(Builder)} for subclasses, or {@link #newBuilder()}
498+
* with {@link Builder#setAccessToken(AccessToken)} and {@link
499+
* Builder#setUniverseDomain(String)} for a non-default universe domain.
493500
*/
494501
@Deprecated
495502
protected GoogleCredentials(

0 commit comments

Comments
 (0)