Skip to content

Add support to refresh JWT tokens for MQTT transport#2083

Merged
jeremydmiller merged 2 commits intoJasperFx:mainfrom
t0ms3n:feat/mqtt_refresh_token
Feb 4, 2026
Merged

Add support to refresh JWT tokens for MQTT transport#2083
jeremydmiller merged 2 commits intoJasperFx:mainfrom
t0ms3n:feat/mqtt_refresh_token

Conversation

@t0ms3n
Copy link

@t0ms3n t0ms3n commented Jan 28, 2026

Currently we only can authenticate once by providing the token with the options by using
.WithAuthentication("OAUTH2-JWT", Encoding.UTF8.GetBytes(accessToken.Token)). This change provides another parameter to .UseMqtt(...), where we define a callback function to fetch the token and a timespan when the token should be refreshed.
If the parameter is set, the authentication is automatically set to "OAUTH2-JWT" and an initial token is fetched on transport initialization.

Also #2079 is fixed, by adding a null-check on the user options of incoming messages.

@jeremydmiller
Copy link
Member

@t0ms3n Hey, I'm struggling to keep up w/ Wolverine prs and fixes right now. Trying to get this in reasonably soon, but it might not make 5.14

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.

3 participants