ndidplatform / api

NDID API
GNU Affero General Public License v3.0
27 stars 18 forks source link

Idp check dcontract hash #103

Closed bomu-bomu closed 2 years ago

bomu-bomu commented 2 years ago

Abstract On IdP, if request type is dcontract, we will validate document integrity before sending to IdP App.

Document have to be downloaded by platform.

If there are not document or any document failed from integrity check, platform will return error code 31000 back to idp in order to notify that the request is error.

Configuration Added DCONTRACT_VALIDATE - to enable dcontract validation (default: true) DCONTRACT_FETCH_TIMEOUT - Fetching document timeout in millisecond (Default: 15000ms)

bomu-bomu commented 2 years ago

Mock and Unittest reside in this link https://github.com/bomu-bomu/dcontract-msg-validator unittest - index.test.js pdf url mock - mock_pubic_url run with docker

bomu-bomu commented 2 years ago

Example Integration Test

rp-client.txt