Create a middleware to check the authentication and the authorization in API.
The authentication should just check if the API is being called using a valid Bearer token.
The authorization should check if the caller is an organizer (for now, this is the only use case).
Decorate fastify with the middlewares.
Add an utility that will be used to test if the calls are being done with an authenticated user and if the authenticated user is an organizer.
Create a middleware to check the authentication and the authorization in API. The authentication should just check if the API is being called using a valid Bearer token. The authorization should check if the caller is an organizer (for now, this is the only use case).
Decorate fastify with the middlewares.
Add an utility that will be used to test if the calls are being done with an authenticated user and if the authenticated user is an organizer.