Skip to content

Commit a4d3512

Browse files
committed
---
yaml --- r: 3705 b: refs/heads/pubsub-alpha c: 4e0248f h: refs/heads/master i: 3703: 2b8e039
1 parent 26edda7 commit a4d3512

3 files changed

Lines changed: 23 additions & 22 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 36a62ef856d199f8efd09501b5ba65c422c01f23
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: 7406918e071dd2c5677a638ae2a06e7592b6542c
5-
refs/heads/pubsub-alpha: ddb1adee1e560b4001d335e3d7804f5723140854
5+
refs/heads/pubsub-alpha: 4e0248f951ddc61ae2a5cdb82d1f953f3bba17cb
66
refs/heads/update-datastore: 47aae517c2cb33f1dccd909adaced73ec9d0f4df
77
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
88
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd

branches/pubsub-alpha/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -456,27 +456,27 @@ public WriteChannel writer(BlobWriteOption... options) {
456456
/**
457457
* Generates a signed URL for this blob. If you want to allow access for a fixed amount of time to
458458
* this blob, you can use this method to generate a URL that is only valid within a certain time
459-
* period. This is particularly useful if you don't want publicly accessible blobs, but don't want
460-
* to require users to explicitly log in. Signing a URL requires a service account
461-
* and its associated private key. If a {@link AuthCredentials.ServiceAccountAuthCredentials} was
462-
* passed to {@link StorageOptions.Builder#authCredentials(AuthCredentials)} or the default
463-
* credentials are being used and the environment variable {@code GOOGLE_APPLICATION_CREDENTIALS}
464-
* is set, then {@code signUrl} will use that service account and associated key to sign the URL.
465-
* If the credentials passed to {@link StorageOptions} do not expose a private key (this is the
466-
* case for App Engine credentials, Compute Engine credentials and Google Cloud SDK credentials)
467-
* then {@code signUrl} will throw an {@link IllegalArgumentException} unless a service account
468-
* with associated key is passed using the {@code SignUrlOption.serviceAccount()} option. The
469-
* service account and private key passed with {@code SignUrlOption.serviceAccount()} have
470-
* priority over any credentials set with
471-
* {@link StorageOptions.Builder#authCredentials(AuthCredentials)}.
459+
* period. This is particularly useful if you don't want publicly accessible blobs, but also don't
460+
* want to require users to explicitly log in. Signing a URL requires a service account and its
461+
* associated private key. If a {@link AuthCredentials.ServiceAccountAuthCredentials} was passed
462+
* to {@link StorageOptions.Builder#authCredentials(AuthCredentials)} or the default credentials
463+
* are being used and the environment variable {@code GOOGLE_APPLICATION_CREDENTIALS} is set, then
464+
* {@code signUrl} will use that service account and associated key to sign the URL. If the
465+
* credentials passed to {@link StorageOptions} do not expose a private key (this is the case for
466+
* App Engine credentials, Compute Engine credentials and Google Cloud SDK credentials) then
467+
* {@code signUrl} will throw an {@link IllegalArgumentException} unless a service account with
468+
* associated key is passed using the {@code SignUrlOption.serviceAccount()} option. The service
469+
* account and private key passed with {@code SignUrlOption.serviceAccount()} have priority over
470+
* any credentials set with {@link StorageOptions.Builder#authCredentials(AuthCredentials)}.
472471
*
473-
* <p>Example usage of creating a signed URL that is valid for 2 weeks:
472+
* <p>Example usage of creating a signed URL that is valid for 2 weeks, using the default
473+
* credentials for signing the URL:
474474
* <pre> {@code
475475
* blob.signUrl(14, TimeUnit.DAYS);
476476
* }</pre>
477477
*
478478
* <p>Example usage of creating a signed URL passing the {@code SignUrlOption.serviceAccount()}
479-
* option:
479+
* option, that will be used for signing the URL:
480480
* <pre> {@code
481481
* blob.signUrl(14, TimeUnit.DAYS, SignUrlOption.serviceAccount(
482482
* AuthCredentials.createForJson(new FileInputStream("/path/to/key.json"))));

branches/pubsub-alpha/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Storage.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,10 +1480,10 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
14801480
* Generates a signed URL for a blob. If you have a blob that you want to allow access to for a
14811481
* fixed amount of time, you can use this method to generate a URL that is only valid within a
14821482
* certain time period. This is particularly useful if you don't want publicly accessible blobs,
1483-
* but don't want to require users to explicitly log in. Signing a URL requires a service account
1484-
* and its associated private key. If a {@link ServiceAccountAuthCredentials} was passed to
1485-
* {@link StorageOptions.Builder#authCredentials(AuthCredentials)} or the default credentials are
1486-
* being used and the environment variable {@code GOOGLE_APPLICATION_CREDENTIALS} is set, then
1483+
* but also don't want to require users to explicitly log in. Signing a URL requires a service
1484+
* account and its associated private key. If a {@link ServiceAccountAuthCredentials} was passed
1485+
* to {@link StorageOptions.Builder#authCredentials(AuthCredentials)} or the default credentials
1486+
* are being used and the environment variable {@code GOOGLE_APPLICATION_CREDENTIALS} is set, then
14871487
* {@code signUrl} will use that service account and associated key to sign the URL. If the
14881488
* credentials passed to {@link StorageOptions} do not expose a private key (this is the case for
14891489
* App Engine credentials, Compute Engine credentials and Google Cloud SDK credentials) then
@@ -1492,13 +1492,14 @@ private static void checkContentType(BlobInfo blobInfo) throws IllegalArgumentEx
14921492
* account and private key passed with {@code SignUrlOption.serviceAccount()} have priority over
14931493
* any credentials set with {@link StorageOptions.Builder#authCredentials(AuthCredentials)}.
14941494
*
1495-
* <p>Example usage of creating a signed URL that is valid for 2 weeks:
1495+
* <p>Example usage of creating a signed URL that is valid for 2 weeks, using the default
1496+
* credentials for signing the URL:
14961497
* <pre> {@code
14971498
* service.signUrl(BlobInfo.builder("bucket", "name").build(), 14, TimeUnit.DAYS);
14981499
* }</pre>
14991500
*
15001501
* <p>Example usage of creating a signed URL passing the {@code SignUrlOption.serviceAccount()}
1501-
* option:
1502+
* option, that will be used for signing the URL:
15021503
* <pre> {@code
15031504
* service.signUrl(BlobInfo.builder("bucket", "name").build(), 14, TimeUnit.DAYS,
15041505
* SignUrlOption.serviceAccount(

0 commit comments

Comments
 (0)