Sean Moylan - G00299424
As part of 4th Year Distributed Systems module I was asked to build a gRPC password service (Part 1) and an API Client (Part 2) that can create user accounts and user the password service to hash the user passwords and compare hashes
- macOS Catalina
- Intellij IDEA
- Swagger
- Postman
To run the PasswordService jar file
- Open Terminal
- navigate to the directory
/Targetin the project folder - run
java -jar PasswordService.jar - After that is run it should say server running on port 9999
- Server is now ready for client requests
Once you have the PasswordService running, you then need to start up the Client
- Open Terminal
- navigate to the directory
/Targetin the project folder - run
java -jar target/ClientService-1.0-SNAPSHOT.jar server configuration.yml - By default the application will run on
port:8080and admin will run onport:8081 - Server is now ready for client requests
If you dont have postman downloaded then click here to download
-
GET: All users =http://localhost:8080/users/ -
GET: UserById =http://localhost:8080/users/{enter id here} -
DELETE: Delete UserById =http://localhost:8080/users/{enter id here} -
POST: Create a User =http://localhost:8080/users/ -
PUT: Update UserById =http://localhost:8080/users/{enter id here} -
PUT: Login User =http://localhost:8080/login/ -
CREATE and UPDATE requests are in the following format:
{
"user_id": {Integer},
"user_name": "{String}",
"email": "{String}",
"password": "{String}"
}- LOGIN requests are in the following format:
{
"user_id": {Integer},
"password": "{String}"
}GET: All users =http://localhost:8081/healthcheck/