This project is an example of IdP application on NDID platform with ASP.Net Core 2. This project is based on NDID version as follow:
- smart-contract version 0.5.0
- api version 0.5.2
- examples commit version d022247bf154be6baffd4457a490a8d3086df94e
The latest version of NDID (v0.6) require that hash message for sign will need no padding, which standard crypto library of .Net cannot support.
PS. the source code for web UI that use in this project can be find here https://github.com/apemon/ndid-examples-dotnet-web.git
Required
- Docker CE 17.06+ Install docker
- docker-compose 1.14.0+ Install docker-compose
Start NDID smart-contract
### Clone smart-contract repo
git clone https://github.com/ndidplatform/smart-contract.git```
### Build the `smart-contract` docker image (use v0.5.0 version)
cd smart-contract
git checkout tags/v0.5.0 -b v0.5.0
cd docker
docker-compose -f docker-compose.build.yml build --no-cache
### Run the smart contract components
docker-compose up -d
Start NDID api
### Clone api repo
git clone https://github.com/ndidplatform/api.git```
### Build the `api` docker image (use v0.5.2 version)
cd api
git checkout tags/v0.5.2 -b v0.5.2
cd docker
docker-compose -f docker-compose.build.yml build --no-cache
### Run the api components
docker-compose up -d
Start NDID examples
### Clone examples repo
git clone https://github.com/ndidplatform/examples.git
### Build the `examples` docker image
cd examples
git checkout d022247bf154be6baffd4457a490a8d3086df94e -b 0.5.0
cd docker
docker-compose -f docker-compose.build.yml build --no-cache
### Run the examples components
docker-compose up -d
Start this project (finally)
### Clone examples repo
git clone https://github.com/apemon/ndid-examples-dotnet.git
### Build the `examples` docker image
cd ndid-examples-dotnet
docker-compose -f docker-compose.build.yml build --no-cache
### Run the examples components
docker-compose -f docker-compose.yml up -d
### Set the callback url for ndid api
curl --header "Content-Type: application/json" --request POST --data '{
"incoming_request_url": "http://examples-idp-3:80/api/callback/request",
"accessor_sign_url": "http://examples-idp-3:80/api/callback/accessor"
}' http://localhost:8102/v2/idp/callback
Now, you can go to port 8000-8002 for idp and port 9000 for rp respectively.