Skip to content

Conversation

@buleuszmatak
Copy link
Contributor

Useful when using time-limited tokens to authenticate via auth callout.

When using Options.Builder#token a later reconnection might attempt to reauthenticate with an expired token.
With Options.Builder#tokenSupplier nats.java will invoke the supplier to get a fresh token before each connection attempt.

@buleuszmatak buleuszmatak changed the title Add connection token supplier option Add connection auth token supplier option Jun 6, 2025
Copy link
Contributor

@scottf scottf left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit ba3c0b6 into nats-io:main Jun 7, 2025
1 check passed
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