narjislaraki / pae-2021

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PAE Project 2021 - Group 03

RESTful API : available operations

Operations associated with authentication


URI Function Auths? Operation
auths/login POST No Check the credentials (username and password) and send back the User and a JWT token if validated.
auths/register POST No Send the information (email, username, password, password confirmation, first name, last name, address [street, building number, city, post code, country and optionally unit number]) to the server, which one will send a response back. The following information need to be unique in the DB: email, username.
auths/user/{id} GET Yes Retrieving of the information such as id and username.

Operations associated with users


URI Function Auths? Operation
users/unvalidatedList GET Yes Returns a list populated with every accounts not yet validated
users/user/{id}/accept/{role} PATCH Yes Validate a user. {id} is the user's ID, {role} is the user's role to be. The role has to be client, admin or antiquaire.
users/user/{id} DELETE Yes Delete a user from the DB. {id} is the user's id.

Properties

Logger options

Two fields exist in the properties file

logPath

It can be set to default by writing default.
Doing this, the default location will be the project folder appended by /Logs.
logPath=default

It can also be set to any path following this format A:/a/custom/folder/.
Note that the last slash / in the path is not mandatory but using backslashes is not managed.
logPath=A:/a/custom/folder/

logFileName

The name, with its extension.
No default name is managed here. Thus this field must be filled in.
logFileName=logs.log

Conclusion

logPath=A:/a/custom/folder/
logFileName=myPersonnalLogs.log

Are going to log in A:/a/custom/folder/myPersonnalLogs.log

-----=====-----

logPath=default/
logFileName=logs.log

Are going to log in X:/the/project/location/Logs/logs.log

About


Languages

Language:Java 63.3%Language:JavaScript 27.2%Language:CSS 9.3%Language:HTML 0.3%