Skip to content

Gordeza/ATMService

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ATM Service

API for atm service that communicates with bank service. Bank service only accepts requests incoming from atm via token sent in header, stored in application.yml

Endpoints

GET - localhost:8080/validate

   description - sends request to bank service and returns response about card validation

   requested parameters - cardNumber

POST - localhost:8080/auth

   description - sends request to bank service and upon successful authentication returns information .

   requested parameters - cardNumber, pin

   return type example

{
  "token": "JWT_token",
  "type": "Bearer",
  "id": 1,
  "cardNumber": "1234123412341234"
}

POST - localhost:8080/deposit

   description - sends request to bank service and to make a deposit on account from the card. JWT token also should be present in header for successful authentication, otherwise request will be rejected.

   requested parameters - amount

   header parameters - {Authorization : "Bearer JWT_token"}

POST - localhost:8080/withdraw

   description - sends request to bank service and to withdraw money from account via the card. JWT token also should be present in header for successful authentication, otherwise request will be rejected.

   requested parameters - amount

   header parameters - {Authorization : "Bearer JWT_token"}

GET - localhost:8080/withdraw

   description - sends request to bank service and check account balance. JWT token also should be present in header for successful authentication, otherwise request will be rejected.

   header parameters - {Authorization : "Bearer JWT_token"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages