Open Kalin-Rudnicki opened 2 weeks ago
It's not currently run in a scope, in fact the environment isn't touched at all. Though it might make sense to implement such a functionality. Here's the code for handling requests - I imagine the changes would have to be done there. Provided that you are using zio-http, of course.
If you'd like to attempt a PR, that would be great :)
Looking at the function signatures for:
Within
zServerSecurityLogic
I would like to useZIO.logAnnotateScoped(_, _)
to add log context from within the JWT that will be there for all requests. If this is possible, it would be super ideal to add this here, as all endpoints are already calling a shared function that decodes the JWT.If things are already executed within a scope, I believe the correct signatures would be: (?)