DApiAuth

DApiAuth is a library used to implement blockchain-based authorization within Go APIs.

Each caller is registered on the chain and every token is stored in the respective smart contracts of the endpoint. The process goes as following:

  1. The caller authenticates in the server.
  2. After authenticating the server registers the caller’s public address as an available token.
  3. The server sends the token to the caller.
  4. In order to access the remote endpoint the caller must go through the smart contract of the specified application with the specified token.
  5. The smart contract decides whether the token is valid and also if it has access to the specified route.
  6. The call is passed on to the endpoint by the smart contract and the result is sent back to the client’s public Ethereum address.

View the project on GitHub.