Skip to content

Feature/check-authentification - #1814

Draft
YohannSchatt wants to merge 2 commits into
developfrom
feature/check-authentification
Draft

YohannSchatt wants to merge 2 commits into
developfrom
feature/check-authentification

Conversation

@YohannSchatt

Copy link
Copy Markdown
Contributor

🤔 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

@ClemRz

ClemRz commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Why not using POST /api/v1/login instead?

@YohannSchatt

Copy link
Copy Markdown
Contributor Author

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 check endpoint can be added. This endpoint will allow the AI server to verify whether the user's credentials are valid.

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.

This branch was successfully deployed

1 active deployment
build — 8eeef480 Deployed Sep 22, 2026 by YohannSchatt via build-test #3864
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants