This is a user storage service for the BuggySoft Job Tracker.
In order to build and use our service you must install the following:
- Maven 3.9.5: https://maven.apache.org/download.cgi Download and follow the installation instructions. Be sure to set the bin as described in Maven's README as a new path variable by editing the system variables if you are on Windows, or by following the instructions for MacOS.
- JDK 17: This project used JDK 17 for development: https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html
- IntelliJ IDE: We recommend using IntelliJ but you are free to use any other IDE that you are comfortable with: https://www.jetbrains.com/idea/download/?section=windows
- Clone the project from GitHub and open it in IntelliJ (or whatever IDE).
- In order to run the project, either use the IntelliJ built in run function, or go to user/target and execute java -jar user-0.0.1-SNAPSHOT.jar.
This section describes the endpoints provided by our service, along with their inputs and outputs.
- Description: Redirects to the homepage.
- Returns: A JSON object with a welcome message and links to register and login.
- Description: Registers a new user in the system.
- Request Body: A
LoginRequestobject containing:email(String)password(String)firstname(String)lastname(String)gender(String)
- Returns: A
ResponseEntitycontaining a success or error message.
- Description: Logs in a user by verifying their credentials.
- Request Body: A
LoginRequestobject containing:email(String)password(String)
- Returns: A
ResponseEntitycontaining user details and a token, or an error message.
- Description: Saves a new user in the system.
- Request Body: A
LoginRequestobject containing:email(String)password(String)firstname(String)lastname(String)gender(String)
- Returns: A
ResponseEntitycontaining the created user object or an error message.
- Description: Deletes a user based on their email.
- Request Body: A
LoginRequestobject containing:email(String)
- Returns: A
ResponseEntitycontaining a success or error message.
- Description: Retrieves all users asynchronously with pagination.
- Query Parameters:
page(Integer): The page number for pagination.size(Integer): The number of users per page.
- Returns: A
ResponseEntitycontaining a JSON object with the request ID and callback URL.
- Description: Retrieves all users synchronously with pagination.
- Query Parameters:
page(Integer): The page number for pagination.size(Integer): The number of users per page.
- Returns: A
ResponseEntitycontaining a JSON object with user data and pagination links.
- Description: Retrieves the status of an asynchronous user retrieval request.
- Path Parameters:
requestId(String): The unique identifier of the request.
- Returns: A
ResponseEntitycontaining user data and pagination links if completed, a processing status message if still processing, or an error message if the request ID is not found.
- Description: Retrieves information about a specific user by email.
- Query Parameters:
email(String): The email address of the user to retrieve.
- Returns: A
ResponseEntitycontaining the user object or an error message.
Certain local variables need to be configured before the service can execute properly.
- DB_URL -- the url of the cloud database used to store the codes.
- DB_USERNAME -- the username of the user account used to access the cloud database.
- DB_PASSWORD -- the password of the user account used to access the cloud database.