MindGest / mindgest-backend

A nodejs + express implementation of a REST API (backend) for the MindGest application.
MIT License
0 stars 0 forks source link

Endpoint: /api/auth/login #9

Closed pedromig closed 1 year ago

pedromig commented 1 year ago

User Login

About

Design a REST API endpoint that allows the user to access the platform, provided that he has the correct information required for authentication.

Tasks

Utils

OpenAPI Spec - SwaggerUI

cabralpinto commented 1 year ago

if successful, response should include a set-cookie header with cookie named "jwt" the jwt should be encoded in base64 and include user information such as the role helpful code: Buffer.from(JSON.stringify({ role: 'admin' })).toString('base64');

cabralpinto commented 1 year ago

status code if successful: 200 status code if unsuccessful: 401