Skip to content
This repository was archived by the owner on Jan 29, 2025. It is now read-only.

JWT Permissions#2

Open
caleblloyd wants to merge 3 commits intomainfrom
caleb/jwt-perms
Open

JWT Permissions#2
caleblloyd wants to merge 3 commits intomainfrom
caleb/jwt-perms

Conversation

@caleblloyd
Copy link

@caleblloyd caleblloyd commented Jul 25, 2023

I started reviewing #1 and thought it might be easier to send this suggestion

This Splits Server and Client connections - this way the Server connection doesn't need permissions but the Client connection can use fine-grained permissions

Instead of storing the JWT and Seed in a cookie, it is requested from the API every time a client needs to make a connection. This makes it a little easier to develop, because creds are refreshed on reload instead of on logout/login.

It also adds a react hook for useClientNatsCon to split out the logic where the client gets a NATS connection. A side effect was that had to be added as a dependency to all of the useEffect blocks that consume it, and callbacks that consume it had to be switched to useCallback with dependencies also.

Collin Togher and others added 3 commits July 24, 2023 19:57
Signed-off-by: Caleb Lloyd <caleb@synadia.com>
Signed-off-by: Caleb Lloyd <caleb@synadia.com>
@caleblloyd caleblloyd requested a review from ctogs July 25, 2023 12:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant