Skip to content

Commit c715fc6

Browse files
chingor13pongad
authored andcommitted
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.
1 parent d7a135a commit c715fc6

File tree

1 file changed

+6
-4
lines changed
  • google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage

1 file changed

+6
-4
lines changed

google-cloud-clients/google-cloud-storage/src/main/java/com/google/cloud/storage/Storage.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,10 +2043,9 @@ public static Builder newBuilder() {
20432043
* {@code GOOGLE_APPLICATION_CREDENTIALS} is set or your application is running in App Engine,
20442044
* then {@code signUrl} will use that credentials to sign the URL. If the credentials passed to
20452045
* {@link StorageOptions} do not implement {@link ServiceAccountSigner} (this is the case, for
2046-
* instance, for Compute Engine credentials and Google Cloud SDK credentials) then {@code signUrl}
2047-
* will throw an {@link IllegalStateException} unless an implementation of
2048-
* {@link ServiceAccountSigner} is passed using the
2049-
* {@link SignUrlOption#signWith(ServiceAccountSigner)} option.
2046+
* instance, for Google Cloud SDK credentials) then {@code signUrl} will throw an
2047+
* {@link IllegalStateException} unless an implementation of {@link ServiceAccountSigner} is
2048+
* passed using the {@link SignUrlOption#signWith(ServiceAccountSigner)} option.
20502049
*
20512050
* <p>A service account signer is looked for in the following order:
20522051
* <ol>
@@ -2076,6 +2075,9 @@ public static Builder newBuilder() {
20762075
* ServiceAccountCredentials.fromStream(new FileInputStream(keyPath))));
20772076
* }</pre>
20782077
*
2078+
* <p>Note that the {@link ServiceAccountSigner} may require additional configuration to enable
2079+
* URL signing. See the documentation for the implementation for more details.</p>
2080+
*
20792081
* @param blobInfo the blob associated with the signed URL
20802082
* @param duration time until the signed URL expires, expressed in {@code unit}. The finest
20812083
* granularity supported is 1 second, finer granularities will be truncated

0 commit comments

Comments
 (0)