-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds token refresh to HTTP example. #517
Conversation
Codecov Report
@@ Coverage Diff @@
## master #517 +/- ##
=======================================
Coverage 97.16% 97.16%
=======================================
Files 13 13
Lines 458 458
=======================================
Hits 445 445
Misses 13 13 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (other than some nitpicking) if tests pass.
iatTime = parseInt(Date.now() / 1000); | ||
console.log(`\tRefreshing token after ${secsFromIssue} seconds.`); | ||
|
||
authToken = createJwt(argv.project_id, argv.private_key_file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this feels like it should be a one-liner.
You can get it under 80 characters using camel case (like the non-IoT samples) and shortening privateKeyFile
to keyFile
. (Worst case scenario, it's probably fine to go a little over 80 characters unless the linter says not to.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
* Adds token refresh to HTTP example. * Review feedback
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
No description provided.