You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/reference/other/openid.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,12 +35,17 @@ Configure your OIDC library with the following parameters:
35
35
|`scope`|`openid`|
36
36
|`client_id`| Any string which uniquely represents your client application |
37
37
|`redirect_uri`| The URI your user should be redirected to once they have completed (or canceled) the flow |
38
+
|`nonce`|*(Optional)* Random nonce value that will be used to bind the generated presentation to the issued token. If not specified, one will be randomly generated. Use this to prevent presentation replays. |
38
39
|**Trinsic-Specific Parameters**|
39
40
|`trinsic:ecosystem`| ID of ecosystem user wallet resides in |
40
41
|`trinsic:schema`|*(Optional)* Comma-separated listed of Schema URLs. Only credentials which match one of these schemas will be returned. |
41
42
|`trinsic:issuer`|*(Optional)* Comma-separated list of Issuer DIDs. Only credentials issued by one of these issuers will be returned. |
42
43
|`trinsic:egf`|*(Optional)* Comma-separated list of [Entity Governance Framework](/learn/concepts/trust-registries) IDs. Only credentials bound to one of these EGF IDs will be returned. |
43
44
45
+
### Presentation Replays and ID Tokens
46
+
47
+
In order to prevent verifiable presentation replays, always specify the `nonce` parameter in the initial call to the authorization endpoint. This will ensure that the generated presentation and the ID token match the current request.
48
+
44
49
### Response Data
45
50
46
51
Once the user has returned to your redirect URL, exchange the authorization code (added to your redirect URI as a query parameter named `code`) for an identity token using your OIDC library.
@@ -82,22 +87,24 @@ You will receive a JSON object of the following form:
82
87
```
83
88
84
89
!!! info "Credential Format"
85
-
Note that the above data has been modified for brevity.
90
+
Note that the above data has been modified for brevity.
86
91
87
92
The `@context` and `type` arrays will contain additional entries which are specific to the credential.
88
93
89
94
90
95
### Verify the Received Proof
91
96
92
-
`vp_token` is a Verifiable Proof; before making use of its data, you must verify it.
97
+
`vp_token` is a Verifiable Proof; before making use of its data, you must verify it.
93
98
94
99
This proof can be verified with any library that supports VC verifications for BBS+ signatures. It can also be verified using Trinsic's SDK; this is as simple as [passing the proof to the VerifyProof call](../../services/credential-service/#verify-proof).
95
100
101
+
If you specified a `nonce` in the authorization request, always verify that the `nonce` claim in the JWT ID token matches the similarly named value in the `_vp_token` document. You may find the nonce in the `_vp_token.proof.nonce` path in the JSON structure. Note that the value in this proof may be specified in base64 format, so you may need to reformat your nonce before comparing. If you specified the nonce as base64 in the request, the two values should match with direct string comparison.
102
+
96
103
97
104
!!! warning "Always Verify"
98
105
It may be tempting to simply take the data in `vp_token` and act upon it without first verifying the proof.
99
106
100
-
**Always verify the proof** before making use of its data.
107
+
**Always verify the proof** before making use of its data.
101
108
102
109
Without verification, the received proof is of no more value than an unsubstantiated claim made by your user.
103
110
@@ -137,4 +144,4 @@ The [OpenID Connect website](https://openid.net/developers/certified/) lists a n
0 commit comments