question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

port tokenHandler callback from go-nats

See original GitHub issue

In some use cases auth tokens might have expiry (like JWTs). In those cases, it would be nice to have a mechanism to ask for a new token before using it for authentication. go-nats already had that functionality added. It would be great to make node-nats feature compatible.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
derekcollisoncommented, Apr 17, 2019

We need to look at more proactive re-authentication.

The Go client will read in the credentials files (new NATS 2.0 style security) such that the connection can be reestablished with the new credentials just by updating the file, but the connection will still be dropped by the server. We will do this work post 2.0.

0reactions
aricartcommented, Apr 22, 2019

@andriy-bulynko the changes are on master and currently in production on our ngs service (see https://www.synadia.com/ngs).

You can read about some of the underlying tech in: https://github.com/nats-io/jwt https://github.com/nats-io/nkeys https://github.com/nats-io/nsc

The nkey/jwt authentication effectively supersedes all the other mechanisms. Docs and visibility of the functionality will show up in the next few days as we release for 2.0. Stay tuned!

Read more comments on GitHub >

github_iconTop Results From Across the Web

go-nats/nats.go at master · nats-io/go-nats - GitHub
New("nats: user callback defined without a signature handler") ... TokenHandler designates the function used to generate the token to be used when ...
Read more >
Untitled
Ecutek ft 86, C programming callback functions, Afghanistan australian soldiers ... Can thue nha, Session security token handler, Ipad wifi problems solved, ...
Read more >
Identosphere Blogcatcher | Planet Identity Reboot
It's one thing to move off centralized online spaces run by corporate giants, and another to settle the decentralized frontiers where we create...
Read more >
Untitled
Port joinville plaisance, Carnegiea gigantea northern road, ... Listener callback pattern, Krajee file input example, String aubade 2014, Isis 15 april 2015 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found