Skip to content

this is the end user's first stop, here we secure our microservice environment using JWT Token and RSA algorithm, and gateway-server directs the secure end user to our other services

License

Notifications You must be signed in to change notification settings

semihshn/gateway-server

Repository files navigation

Diagram

  • As Gateway server monolith, I used the SOA architecture infrastructure because it didn't have much room to grow, so we can say that SOA is a layered architecture, but it does give us strength, if the project grows, not as much as a hexagonal and DDD-enhanced structure

Documentation

basicAuthentication for Sign In and Sign Up end points:

Username: "randomSecureKeyUsername!", Password: "randomSecureKeyPassword!"

Request(Sign Up)

POST

{
  "username":"Test_username",
  "password":"Test_pasw",
  "name":"Test_name"
}

Request(Sign In)

POST

It return a jwt

{
  "username":"Test_username",
  "password":"Test_pasw",
  "name":"Test_name"
}

or

{
  "username":"Test_username",
  "password":"Test_pasw"
}

Request(Add Driver)

POST

Require JWT

{
  "userId":1,
  "firstName":"Test_name",
  "lastName":"Test_last_name",
  "birthDate":"2014-04-29"
}

Request(Get Driver)

GET

Require JWT


Request(Get Driver According To Auth)

GET

Require JWT


Request(Delete Driver By driverId)

DELETE

Require JWT


Request(Add Passenger)

POST

Require JWT

{
  "userId":1,
  "firstName":"Test_name",
  "lastName":"Test_last_name",
  "birthDate":"2014-04-29"
}

Request(Get Passenger)

GET

Require JWT


Request(Get Passenger)

GET

Require JWT


Request(Delete Passenger By passengerId)

DELETE

Require JWT


Docker

  • Open terminal
  • Go to gateway-server directory with cd command
  • Run command that docker run build -t gateway-server-image .
  • Go to driver-service directory with cd command
  • Run command that docker run build -t driver-service-image .
  • Go to passenger-service directory with cd command
  • Run command that docker run build -t passenger-service-image .
  • Go to notification-service directory with cd command
  • Run command that docker run build -t notification-service-image .
  • Go to payment-service directory with cd command
  • Run command that docker run build -t payment-service-image .
  • Go to gateway-server directory with cd command
  • Run command that docker-compose up

or

  • Open terminal
  • Go to gateway-server directory with cd command
  • Run command that docker-compose -f docker-compose_v2.yml up

About

this is the end user's first stop, here we secure our microservice environment using JWT Token and RSA algorithm, and gateway-server directs the secure end user to our other services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published