Feature/check-authentification - #1814
YohannSchatt wants to merge 2 commits into
Conversation
|
Why not using |
|
The goal of the AI server is to ensure that the document analysis endpoint can only be used by a user on GrottoCenter with valid credentials. To avoid duplicating authentication code between the API and the AI service, a new The login endpoint verifies that the email and password are correct and returns a JWT token. It is better for the AI server to remain stateless, so it does not need to store the user's token. I also don't think it is a good idea to have another way to connect to the AI server or to duplicate the authentication code, as this would make the system harder to maintain. |
🤔 What
Add endpoint
/api/v1/auth/check
🤷♂️ Why
For the AI server, verify whether the user is connected and able to use it.
🔍 How
New endpoint, with rule of AuthToken