No description
Find a file
kvanmaasdam 72ee9aa06f
Removed the example-microservice.
Signed-off-by: kvanmaasdam <K.vanMaasdam@student.tudelft.nl>
2024-01-11 08:28:02 +01:00
.gitlab Add lab template 2023-11-17 18:19:46 +01:00
config Checkstyle was so outdated my plugin didn't work. This updates it. It is still the default google checkstyle with indentation and linelength changed to be according to the original. 2023-12-03 16:16:11 +01:00
Documents Merge branch 'minutes-week-4.1' into 'main' 2023-12-09 12:43:42 +01:00
gradle/wrapper Add lab template 2023-11-17 18:19:46 +01:00
instructions Add lab template 2023-11-17 18:19:46 +01:00
order-microservice Removed unnecessary qualifications. 2024-01-09 16:48:37 +01:00
.gitattributes Add lab template 2023-11-17 18:19:46 +01:00
.gitignore Orders need an ID as a parameter before to be created, now I have changed it to be created sequentially starting from 1. 2023-12-18 13:06:32 +01:00
.gitlab-ci.yml attempt to fix pipeline 2023-12-07 14:00:28 +01:00
gradlew Add lab template 2023-11-17 18:19:46 +01:00
gradlew.bat Add lab template 2023-11-17 18:19:46 +01:00
lombok.config Add lab template 2023-11-17 18:19:46 +01:00
README.md Add lab template 2023-11-17 18:19:46 +01:00
settings.gradle Removed the example-microservice. 2024-01-11 08:28:02 +01:00

Lab Template

This template contains two microservices:

  • authentication-microservice
  • example-microservice

The authentication-microservice is responsible for registering new users and authenticating current ones. After successful authentication, this microservice will provide a JWT token which can be used to bypass the security on the example-microservice. This token contains the NetID of the user that authenticated. If your scenario includes different roles, these will have to be added to the authentication-microservice and to the JWT token. To do this, you will have to:

  • Add a concept of roles to the AppUser
  • Add the roles to the UserDetails in JwtUserDetailsService
  • Add the roles as claims to the JWT token in JwtTokenGenerator

The example-microservice is just an example and needs to be modified to suit the domain you are modeling based on your scenario.

The domain and application packages contain the code for the domain layer and application layer. The code for the framework layer is the root package as Spring has some limitations on were certain files are located in terms of autowiring.

Running the microservices

You can run the two microservices individually by starting the Spring applications. Then, you can use Postman to perform the different requests:

Register: image

Authenticate: image

Hello: image