Skip to content
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

Merged
merged 2 commits into from
Nov 3, 2017
Merged

Adds token refresh to HTTP example. #517

merged 2 commits into from
Nov 3, 2017

Conversation

gguuss
Copy link
Contributor

@gguuss gguuss commented Nov 2, 2017

No description provided.

@codecov
Copy link

codecov bot commented Nov 2, 2017

Codecov Report

Merging #517 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 594525a...5a28248. Read the comment docs.

Copy link
Contributor

@ace-n ace-n left a 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,
Copy link
Contributor

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.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@gguuss gguuss merged commit 8e2b651 into master Nov 3, 2017
@gguuss gguuss deleted the iot-http-refresh branch November 8, 2017 16:53
ace-n pushed a commit that referenced this pull request Dec 4, 2017
* Adds token refresh to HTTP example.

* Review feedback
NimJay pushed a commit that referenced this pull request Nov 10, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
NimJay pushed a commit that referenced this pull request Nov 10, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 14, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
kweinmeister pushed a commit that referenced this pull request Nov 18, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 21, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
ace-n pushed a commit that referenced this pull request Nov 21, 2022
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants