Each module should have a specific role. Login modules are handling the login, client is handling the interaction with the cardmarket API, cardmarket-core is handling the business (probably needs to break down), rest exposes endpoint of core modules
Project used jwt token based authentication. It also uses cors protection and Role based access endpoints
- Install postgres, with user/pass: postgres/postgres
- Create an
application-secrets.yaml
in cardmarket-rest project, alongside with application.yaml with the following structure:
security:
jwt:
token:
secret-key: {a secret key with at least 64 characters}
client:
credentials:
app-token: { app-token from cardmarket }
app-secret: { app-secret from cardmarket }
access-token: { access-token from cardmarket }
access-token-secret: { access-token-secret from cardmarket }
power-users: list of users that you would like to scan
- Enable these spring active profiles:
dev, secrets
in the Run/Debug configuration of intellij - Enable liquibase hub in the VM Options:
-Dliquibase.hub.apiKey=vcDko4sK0lh99lGaYsOlUufV2bZiS1LxIGbIfbTJaJs
- Run the CardmarketRestApplication
- Execute the following SQL to add an admin user with credentials:
admin
/Admin!10
INSERT INTO public.application_user (id, create_ts, modify_ts, password, username) VALUES ('71c91ef7-edbd-4067-bd32-2bb27a3165ab', '2021-10-07 07:07:45.172916', '2021-10-07 07:07:45.172947', '$2a$12$sFaEA3yUCDkbLworGm6nMu4MSk6GCyBzJkJRL8s7604Vqz/hxtjNO', 'admin');
INSERT INTO public.application_user_roles (application_user_id, roles) VALUES ('71c91ef7-edbd-4067-bd32-2bb27a3165ab', 1);
- Follow the relevant instructions of cardmarket front