This is a user verification 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 verification/target and execute java -jar verification-0.0.1-SNAPSHOT.jar.
This section describes the endpoints provided by the Verification service, along with their inputs and outputs.
- Description: Provides a welcome message for the Verification API.
- Returns: A JSON object with a welcome message and relevant links for the service.
- Description: Generates a verification code and saves it to the database.
- Request Parameters:
email(String): The email address to associate with the generated code.
- Returns: A
ResponseEntitycontaining a success or error message.
- Description: Verifies the user's code sent to their email.
- Request Parameters:
email(String): The email address associated with the verification code.code(String): The verification code to validate.
- Returns: A
ResponseEntitycontaining a success or error message.
- Description: Handles OAuth callback to retrieve user information from Google.
- Request Parameters:
code(String): The authorization code provided by Google.
- Returns: A
ResponseEntitycontaining user information or an error message.
- Description: Triggers the registration process for a user by sending a verification email.
- Request Parameters:
email(String): The email address of the user to register.
- Returns: A
ResponseEntitycontaining a callback URL for checking the registration status.
- Description: Retrieves the status of a registration request.
- Request Parameters:
executionId(String): The unique identifier for the registration process.
- Returns: A
ResponseEntitycontaining the registration status or an error message.
- Description: Exchanges a Google token for a JWT token after validation.
- Request Body:
email(String): The email address of the user.token(String): The Google token to validate.
- Returns: A
ResponseEntitycontaining a JWT token or an error message.
Certain local variables need to be configured before the service can execute properly.
- SPRING_MAIL_USERNAME -- the email address from which you would like to send the verification codes.
- SPRING_MAIL_PASSWORD -- the app password for the email address (not the regular password).
- 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.