Hello,
I try to create HTTP flows in which users try to authenticate and after positive verification, she or he get a response with a header that contains the token. So far, based on Authenticating Node-RED using JSONWebToken - Part 2 - Compose Articles and Header-based Authorization (flow) - Node-RED I have created such two flows:
The first one is a simple GET with an authentication form as a template and response. The second one POST with an authentication form, a function that retrieves a user from the database. Now I do not know:
- how to verify if user exists
- after positive verification how to create the token and add it to a response header.