Skip to content

Commit 3a2a543

Browse files
authored
Merge pull request #81 from Sphereon-Opensource/feature/VDX-279_documentation
feature/VDX-279: added documents
2 parents 9a411fb + 2e4d836 commit 3a2a543

6 files changed

Lines changed: 424 additions & 106 deletions

File tree

README.md

Lines changed: 17 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
OID4VC technologies, SIOPv2 (peer to peer authentication), OID4VP (Verification), OID4VCI (Issuance) end Presentation
1313
Exchange (requirements by verifiers) work.**
1414

15+
## Overview
16+
17+
In this document we're going to show you step by step what you have to do to set your own VCI demo up.
18+
1519
The demo consists of 3 components, which can be found in the packages folder.
1620

1721
- The agent using our [SSI-SDK](https://github.com/Sphereon-OpenSource/SSI-SDK), responsible for key-management, DIDs,
@@ -41,117 +45,24 @@ The most prominent low-level libraries are:
4145
## Wallet Prerequisites
4246

4347
You will need an OID4VC capable wallet, that supports SIOPv2, OID4VP, OID4VCI and Presentation Exchange. You can use our
44-
Open-Source wallet from the stores. See our wallet [Github](https://github.com/Sphereon-OpenSource/ssi-mobile-wallet) or
45-
our [Wallet demo instructions](https://sphereon.com/sphereon-products/sphereon-wallet/sphereon-wallet-demo-instructions/)
46-
47-
## Issuer demo
48-
49-
If you run `pnpm run start:dev` the Issuer frontend, the verifier frontend and the agent will be started. Your browser
50-
should automatically
51-
open https://localhost:5001. You can also go to https://ssi.sphereon.com/demo/issuer, for an online hosted
52-
demo. https://ssi.dutchblockchaincoalition.org/demo/issuer, https://ssi.triall.io/demo/issuer hosts different integration/use cases you can test with.
53-
54-
You should be greeted with the introduction screen
55-
56-
<img src="resources/issuer-demo-intro.png" width="500"/>
57-
58-
There are 2 flows. One is a manual flow, where you will fill out some information (the information will not be
59-
shared/stored) in order to receive a credential. The other flow is using your wallet to request the information
60-
required (SIOPv2/OID4VP). Obviously the demo is having a few more screens than strictly necessary, just to show the
61-
different steps involved.
62-
63-
The flow should be pretty self-explanatory. In the end your wallet should end up with a credential-offer that you can
64-
accept or decline:
65-
66-
<img src="./resources/Wallet_Credential_offer.jpg" alt="Wallet credential offer" width="300px"/>
67-
68-
## Verifier demo
69-
70-
Next to the Issuer frontend, the verifier frontend will also be started with the `pnpm run start:dev` command. Your
71-
browser
72-
should automatically
73-
open https://localhost:5002. You can also go to https://ssi.sphereon.com/demo/verifier, for an online hosted
74-
demo. https://dutchblockchaincoalition.org/userLogin hosts an integration into the DBC website and Craft CMS.
75-
76-
You should be greeted with the introduction screen
77-
78-
<img src="resources/start-screen.png" width="500px"/>
79-
80-
81-
Click "Sign in"
82-
A QR code will appear which can be scanned with the mobile SIOPv2/OID4VP OP authenticator module from our SSI-SDK.
83-
84-
<img src="resources/login-qr-screen.png" width="500px"/>
85-
86-
It will ask for a certain type of credential, you should now have in your wallet
87-
88-
<img src="./resources/Wallet_Credential_Verifier.jpg" alt="Wallet credential Verifier" width="300px"/>
89-
90-
Once the SIOP accepts the receipt of the Presentation Definition the screen will change to:
91-
92-
<img src="resources/login-wait-def-screen.png" width="500px"/>
93-
94-
As soon as the SIOP sends in the Verifiable Presentation that conforms to the definition the SIOP will be authenticated:
95-
96-
<img src="resources/vp-received-screen.png" width="500px"/>
97-
98-
Note the Information in the top left corner which actually comes from the Verifiable Credential sent by the SIOP.
99-
100-
## Developers
101-
102-
#### Configure environment
103-
104-
In the `./packages/agent`, `./packages/oid4vci-demo-frontend`, `./packages/oid4vp-demo-frontend` directories copy the
105-
file called .env to .env.local and populate it using .env as example. A valid
106-
config will look like below. Not all properties are listed.
107-
108-
**agent .env.local**
109-
110-
```dotenv
111-
NODE_ENV=local
112-
HOSTNAME=0.0.0.0 # bind to all network adapters
113-
PORT=5000 # The port to use
114-
DB_ENCRYPTION_KEY=29739248cad1bd1a0fc4d9b75cd4d2990de535baf5caadfdf8d8f86664aa830c # The key used to encrypt certain database fields
115-
OID4VP_ENABLED="true" # Whether to enable OpenID for Verifiable Presentations
116-
OID4VP_WEBAPP_BASE_URI=http://192.168.2.90:5000 # The base URL of the webapp. This will be communicated in the QR code. Please use an IP or hostname that is resolvable from your wallet
117-
OID4VP_AGENT_BASE_URI=http://192.168.2.90:5000 # The base URL of the agent. Please use an IP address, or hostname that is resolvable from you wallet
118-
AUTH_REQUEST_EXPIRES_AFTER_SEC=180 # How long to keep a session alive. You need to finish the auth with a certain QR code /deeplink in this time
119-
CONF_PATH="./my-config-path" #Allows you to set a custom configuration path
120-
```
121-
122-
**oid4vci-demo-frontend .env.local**
123-
124-
```dotenv
125-
REACT_APP_ENVIRONMENT=sphereon # The branding and built in credential defnitions and metadata to use. Supported values: sphereon, dbc, triall, fmdm, energyshr
126-
PORT=5001 # The port to use when running pnpm run start:dev. Please note that you can also build the project, and host it on a regular webserver.
127-
```
128-
129-
**openid4vp-demo-frontend .env.local**
130-
131-
```dotenv
132-
REACT_APP_QR_CODE_EXPIRES_AFTER_SEC=300 # How long with the authentication session be valid
133-
REACT_APP_PRESENTATION_DEF_ID=sphereonGuest # The presentation definition ID supported by the SSI-SDK agent (the agent can support multiple definitions)
134-
REACT_APP_BACKEND_BASE_URI=http://192.168.2.90:5000 # The base URL of the agent, needs to be resolvable by the wallet!
135-
PORT=5002 # The port to use when running pnpm run start:dev. Please note that you can also build the project, and host it on a regular webserver.
136-
```
137-
138-
#### Build & start
139-
140-
We use pnpm. Currently you cannot use regular npm or yarn to build this project!
141-
install pnpm globally using `npm -g install pnpm`
48+
Open-Source wallet from the stores. You can see our [Wallet demo instructions](https://sphereon.com/sphereon-products/sphereon-wallet/sphereon-wallet-demo-instructions/)
49+
Here is a list of wallet's with above-mentioned capabilities:
50+
- [Sphereon](https://github.com/Sphereon-Opensource/ssi-mobile-wallet)
51+
- [Animo](https://github.com/animo/paradym-wallet)
14252

143-
From the root directory
53+
A scenario for fetching a credential. Note that since the process is dynamic, your setup might be a little different, but the main parts will stay the same.
14454

145-
- pnpm install
146-
- pnpm build
147-
- pnpm start:dev
55+
//TODO: when merged, change the address
56+
![To fetch a credential](./documents/vci-flow.puml)
14857

149-
The server will start on port 5000, the client will start & open a browser on http://localhost:5001/ for the issuer
150-
and https://localhost:5002 for the verifier
58+
And a scenario for using Verifiable Credential(s) For OID4VP flow:
59+
![OID4VP flow](./documents/oid4vp-flow.puml)
15160

152-
#### Usage
61+
In the next chapters we're going to show you how to setup the `agent` module, oid4vci-demo-front-end and a brief introduction on how credential branding actually works.
15362

154-
Once the demo site has loaded, you should see the following screen:
63+
- [Setting up the agent](./documents/agent-setup.md)
64+
- [Setting up VCI frontend](./documents/vci-front-end.md)
65+
- [Credential Branding](./documents/credential-branding.md)
15566

15667
### Docker
15768

0 commit comments

Comments
 (0)