-
Notifications
You must be signed in to change notification settings - Fork 0
Authentification API
Liam Boudadi edited this page Feb 6, 2025
·
13 revisions
POST /change-password (change the user's password)
None
http code content-type response 200stringPassword changed successfully400stringNew password does not meet security requirements401stringCurrent password is incorrect404stringUser not found
curl -L -X POST 'http://localhost:8080/authenticate/change-password' -H 'Authorization: Bearer {jwt}' --data-raw "{"currentPassword": {string}, "newPassword": {string}}"
POST /reset-password?{email} (reset the requested user password)
name type data type description required int The specific user email
http code content-type response 200stringPassword reset successfully404stringUser not found500stringError sending email
curl -L -X POST 'http://localhost:8080/authenticate/reset-password?{email}' -H 'Authorization: Bearer {jwt}'
GET /need-change-password (return true if the current user needs to change his password, false otherwise)
None
http code content-type response 200stringTrue or False404stringUser not found
curl -L -X GET 'http://localhost:8080/authenticate/need-change-password' -H 'Authorization: Bearer {jwt}'
POST /delete-user?{email} (delete the request user)
name type data type description required string The specific user email
http code content-type response 200stringUser deleted successfully404stringUser not found
curl -L -X POST 'http://localhost:8080/authenticate/delete-user?{email}' -H 'Authorization: Bearer {jwt}'
GET /export-users (export users in csv file)
None
http code content-type response 200csvUsers' info500stringError exporting users: {error message}
curl -L -X GET 'http://localhost:8080/authenticate/export-users' -H 'Authorization: Bearer {jwt}'
GET /{formationId} (gets details about the formation requested)
name type data type description formationId required int The specific formation id
http code content-type response 200json{"id": {int}, "name": {string}, "description": {string}}404N/A
curl -L -X GET 'http://localhost:8080/formation/{formationId}' -H 'Authorization: Bearer {jwt}'