Git Product home page Git Product logo

touch-instinct-assignment's Introduction

Example API

This is an example API that uses Swagger to document its endpoints.

PIN code and biometric auth

All operations with PIN code and biometric auth should be performed on application side

  • PIN code should be created on first login
  • If biometric auth wasn't succesfull request PIN code input
  • If user prvided wrong PIN 3 times, call /logout

Endpoints

The API has the following endpoints:

/login

  • Base validation of username and password should be performed on application side

  • Auth button should be unactive till user didn't provide values to both fields

  • If error recieved from backend application should provide button for password recovery

  • PUT: Perform authorization

/logout

  • Logout should be performed if user could validate identity via passcode or couldn't pass biometric identification

  • POST: Revocate authorization

/forgot/password

  • If user forgot password he should be able to recover it via request with login and description in comment field

  • POST: Request password recovery

/forgot/login

  • If user forgot login too, he should be able to provide additional information, like bith date via request with description in comment field

  • POST: Request login recovery

/welcome

  • Endpoint should return welcome message, it would be used for promo, jokes, etc., without changes on application side

  • GET: Get welcome message

/card

  • GET: Get list of cards

/card/{card_id}

  • GET: Get card by ID
  • POST: Block card

/card/{card_id}/transaction

  • GET: Get list of transactions

/card/{card_id}/transaction/{transaction_id}

  • GET: Get transaction by ID
  • POST: Create transaction dispute

/complain

  • GET: Get list of complains
  • POST: Create complain

Authentication

The API uses JWT authentication. To authenticate, send a POST request to /login with a username and password in the request body. This will return an access token that can be used to access protected endpoints.

To access protected endpoints, include the access token in the Authorization header of your requests.

touch-instinct-assignment's People

Contributors

swchck avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.