Skip to content

Authentication

Alexandre Soler Sanandres requested to merge authentication into develop

Related to issue socrates-client#25 (closed)

Waiting for !18 (merged) to be merged

Solves socrates-client#71 (closed)

Authentication

The server side of the login is implemented here. The client sends email and password and we check them here.

If successful, the following will be returned to the client: {token: 'a JWT token'}

On Failure: {token: ''}

In addition, the request header is checked for the presence of a JWT token to determine whether the user is already authenticated or not. A 401 Error is returned if no authentication token is found and the end point of the request is a secured one.

Edited by Alexandre Soler Sanandres

Merge request reports