Effect CommunityEC
Effect Community15mo ago
3 replies
jakubryska

Accessing Middleware "Provides" in Effect Handlers

Hi, I added the authorization middleware — the bearer one to my api definition based on this: https://github.com/Effect-TS/effect/blob/main/packages/platform/README.md#defining-security-middleware.

While it works in the sense that middleware handler will check the token in the header, I don't know how to access the provides stuff in the handlers. In the handler, .handle('findById', (params) => Effect.succeed(null)) the params contains all the other params to the api endpoint like urlParams or payload that I defined in the endpoint, but not the provides that comes from the middleware.

How do I access that?
Was this page helpful?