Uh oh!
There was an error while loading. Please reload this page.
storage: fix credentials issue. - #164
Conversation
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
15484d5 to
0de5a0dCompare
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
c47c526 to
25a6b06ComparePreviously, if a user wanted to generate a signed URL, there was no guarantee a credentials object would have already been generated. By itself, generating a signed URL doesn't require a network connection, thus the uncertainty that we would have already fetched a token. This change requires a valid credentials object to exist before returning the `credentials` object.
25a6b06 to
bb4cd17Comparerakyll
commented
Sep 5, 2014
Sorry, I'm not familiar with signed URLs. Is there anyone else to review it @silvolu, from Storage team? |
stephenplusplus
commented
Sep 5, 2014
Np, this is actually mostly an API change - adding the Currently, we wait until an API request to fetch a token, which makes sense. But to create a signed URL, we don't actually have to make an API call. So, we never get a credentials object (unless the user provided it themselves), which is why I added this method. It will return the credentials if they're available, otherwise it will go build it for us by making a fetchToken call. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
* updated CHANGELOG.md [ci skip] * updated package.json [ci skip] * updated samples/package.json [ci skip]
* build: check dead links on Kokoro * recursive crawl local links * annotate Project#exists with @method * npm run fix
* fix doc string * gts fix
…e new Cloud Storage samples (#164) * Brought Pub/Sub samples code coverage up to 98.66%
…e new Cloud Storage samples (#164) * Brought Pub/Sub samples code coverage up to 98.66%
Previously, if a user wanted to generate a signed URL, there was no guarantee a credentials object would have already been generated. By itself, generating a signed URL doesn't require a network connection, thus the uncertainty that we would have already fetched a token. This change requires a valid credentials object to exist before returning the
credentialsobject.This also brings up an issue. We need to go through the code to catch any "maybe async, maybe not" functions, and add in a(#166)process.nextTickwhere necessary.