Structs§
Functions§
- generate_
jwt - Function to generate a JWT token The token will be valid for 1 hour and will be signed with the secret
- with_
jwt_ auth - Used to protect the route with JWT authentication The middleware will check if the token is valid and not expired If the token is valid, it will call the handler function If the token is invalid or expired, it will send back a 401 error The handler function will receive the request, response and the claims