Skip to content
A mock identity provider, returning wallets to a caller
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main
.gitignore
LICENSE
README.md
pom.xml

README.md

Mock Identity Provider

This project represents a mock identity provider which returns pre-allocated private-keys until none are left.

Configuration

The identity provider is running on port 8090 by default. If you need to change this setting, head to src/main/resources/application.properties and change the value of server.port.

Routes

Add new wallets

In order to add new wallets (and remove the old ones), submit their private keys.

Route: POST http://localhost:8090/wallets

    {
        "wallets": [
            {
                "private-key": "0"
            },
            {
                "private-key": "1"
            },
            {
                "private-key": "2"
            }
        ]
   }

Get a wallet

In order to get a non-assigned wallet's private-key, use the following route:

Route: GET http://localhost:8090/wallets/next

On success, you'll retrieve a response with status code 200. Its response body will contain:

    {
      "private-key": "0"
    }

On failure, you'll retrieve a response with status code 404. Its response body will contain

    {
      "timestamp": 1519138261748,
      "status": 404,
      "error": "Not Found",
      "exception": "org.provotum.mockidentityprovider.exception.NoWalletLeftException",
      "message": "No wallet left",
      "path": "/wallets/next"
    }
You can’t perform that action at this time.