From c715fc6309f269af8ffae07c0c356206033d6384 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 4 Sep 2018 12:33:21 -0700 Subject: [PATCH] Update signUrl documentation (#3546) * Removed ComputeCredentials from examples of credentials that cannot sign URLs. * Added a note to look at the implementations' documentation for additional setup steps needed. --- .../main/java/com/google/cloud/storage/Storage.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java index b49d48c70b08..78f9390a67e4 100644 --- a/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java +++ b/google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java @@ -2043,10 +2043,9 @@ public static Builder newBuilder() { * {@code GOOGLE_APPLICATION_CREDENTIALS} is set or your application is running in App Engine, * then {@code signUrl} will use that credentials to sign the URL. If the credentials passed to * {@link StorageOptions} do not implement {@link ServiceAccountSigner} (this is the case, for - * instance, for Compute Engine credentials and Google Cloud SDK credentials) then {@code signUrl} - * will throw an {@link IllegalStateException} unless an implementation of - * {@link ServiceAccountSigner} is passed using the - * {@link SignUrlOption#signWith(ServiceAccountSigner)} option. + * instance, for Google Cloud SDK credentials) then {@code signUrl} will throw an + * {@link IllegalStateException} unless an implementation of {@link ServiceAccountSigner} is + * passed using the {@link SignUrlOption#signWith(ServiceAccountSigner)} option. * *

A service account signer is looked for in the following order: *

    @@ -2076,6 +2075,9 @@ public static Builder newBuilder() { * ServiceAccountCredentials.fromStream(new FileInputStream(keyPath)))); * } * + *

    Note that the {@link ServiceAccountSigner} may require additional configuration to enable + * URL signing. See the documentation for the implementation for more details.

    + * * @param blobInfo the blob associated with the signed URL * @param duration time until the signed URL expires, expressed in {@code unit}. The finest * granularity supported is 1 second, finer granularities will be truncated