Skip to content

The back end of the cardmarket, integrating with cardmarket and providing jwt token authentication

License

Notifications You must be signed in to change notification settings

happyharbor/cardmarket-back

Repository files navigation

Cardmarket backend

CircleCI Coverage Quality Gate Status Technical Debt GitHub license

Service Oriented Architecture

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

Spring Security

Project used jwt token based authentication. It also uses cors protection and Role based access endpoints

Setting up development environment

  1. Install postgres, with user/pass: postgres/postgres
  2. 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
  1. Enable these spring active profiles: dev, secrets in the Run/Debug configuration of intellij
  2. Enable liquibase hub in the VM Options: -Dliquibase.hub.apiKey=vcDko4sK0lh99lGaYsOlUufV2bZiS1LxIGbIfbTJaJs
  3. Run the CardmarketRestApplication
  4. 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);
  1. Follow the relevant instructions of cardmarket front

Support

This project is being supported by jetbrains logo

About

The back end of the cardmarket, integrating with cardmarket and providing jwt token authentication

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages