This is a users management system
- java 15 installed.
- Java Ide (Intellij Prefered).
To setup this project you can follow one of the two following methods
Start by cloning project with
git clone https://github.com/robvan2/project-563123.git
For this readme i'am assuming you're using intellij. Wait for Maven to resolve all the dependencies then :
This link shows you how to Lombok Intellij. Then in your project: Click Preferences -> Build, Execution, Deployment -> Compiler, Annotation Processors. Click Enable Annotation Processing Afterwards you might need to do a complete rebuild of your project via Build -> Rebuild Project.
Navigate to ProjectApplication and Run It.
-
Start By downloading project (.jar file) Project Drive.
-
Open your terminal and navigate to the folder in which you saved the project.
-
Run the following command :
java -jar project-0.0.1-SNAPSHOT.jar
This section familiarizes you with the project's features.
The project uses Swagger ui. which contains full roadmap of the project APIs (routes + Dtos to privide (request body) + Response). Use the following link to access
http://localhost:8080/swagger-ui.html
It's an in memory database. To access the console use http://localhost:8080/h2-console/
,
then use username recruitment
and passsword 563123
(also jdbc url jdbc:h2:mem:recruitment
).
You can change that if you setup the project with the 1st method by changing it in application.properties
- For authentification I used jwt
- all routes are accessible without authentication except for checkToken and logout.
- /api/checkToken with "Authorization" header (Bearer token) checks the validity of a token and returns the user.
- /api/logout invalidates the token (must provide Bearer token in Authorization header).
- /api/users/find searches for users that contain the searched value in there username or email.