These are the python scripts required to perfrom DID-based authentication. The setup folder contains some setup scripts that must be run only once. These scipts set up the pool, the corresponding wallets, and DIDs. The server script is used by the oauth server in order to generate a proof request, as well as in order to verify a proof. The client script is used by clients in order to generate a proof
These scripts assume an existing pool of Indy nodes. Moreover, these scripts require Indy-SDK. In all (5) files replace the variables pool_name and pool_genesis_txn_path with the correct values. Edit the file setup/1.setup_pool_and_wallets.py and modify the variables steward_id, steward_seed and steward_conf_did accordingly. Then run this scipt.
As a next step run the script setup/2.create_schema_and_credentials.py This script will output some python code. This code should be tranferred to the following files: setup/3.issue_credentials.py, client.py and server.py.
Finally, execute the script setup/3.issue_credentials.py
Executing clients and servers
The first time the oauth server receives a request executes the server.py script with inputs "generate" and a nonce, e.g., server.py generate "12345678". The scripr outputs a proof request which is sent back to the client. The client generates a proof. The clien.py can generate this proof by executing client.py '' where is the proof request outputed by the server in the previous step. The client outputs the proof. Then the server script is executed with inputs "verify", the nonce used in the first step, and the proof generated by the client (enclosed in sigle quotes). The server then verifies the proof and outputs the role of the client.