-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: integrate post to credential_issuer/credential in chain
- Loading branch information
1 parent
b361c9a
commit c92a9d3
Showing
4 changed files
with
119 additions
and
5 deletions.
There are no files selected for viewing
81 changes: 81 additions & 0 deletions
81
wallet/7_holder_sends_credential_request_to_api_credential.zen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
scenario 'w3c': DPoP | ||
|
||
# keys | ||
Given I have a 'keyring' | ||
Given I have a 'string' named 'client_id' | ||
|
||
# data | ||
Given I have a 'string' named 'format' inside 'oauth_flow_parameters' | ||
Given I have a 'string' named 'vct' inside 'oauth_flow_parameters' | ||
Given I have a 'string' named 'Authorization' inside 'oauth_flow_parameters' | ||
Given I have a 'string' named 'credential_endpoint' inside 'oauth_flow_parameters' | ||
Given I have a 'string' named 'resource' inside '!external-qr-code-content' | ||
|
||
Given I have a 'string' named 'access_token' | ||
Given I have a 'string' named 'c_nonce' | ||
|
||
|
||
When I create jwk of es256 public key | ||
|
||
When I copy 'resource' to 'aud' | ||
|
||
If I verify 'resource' has suffix '/' | ||
When I split the rightmost '1' bytes of 'resource' | ||
Endif | ||
When I append 'credential_endpoint' to 'resource' | ||
and I rename 'resource' to 'authorization_server_credential_endpoint' | ||
|
||
## 1. Create proof-payload | ||
|
||
When I create the 'string dictionary' named 'proof-payload' | ||
|
||
When I create the timestamp | ||
When I rename the 'timestamp' to 'iat' | ||
|
||
When I move 'iat' in 'proof-payload' | ||
|
||
When I rename the 'client_id' to 'iss' | ||
When I move 'iss' in 'proof-payload' | ||
When I move 'aud' in 'proof-payload' | ||
|
||
When I rename the 'c_nonce' to 'nonce' | ||
When I move 'nonce' in 'proof-payload' | ||
|
||
## end 1. | ||
|
||
## 2. create proof-header | ||
|
||
When I create the 'string dictionary' named 'proof-header' | ||
When I set 'alg' to 'ES256' as 'string' | ||
When I set 'typ' to 'open4vci-proof+jwt' as 'string' | ||
|
||
When I move 'alg' in 'proof-header' | ||
When I move 'typ' in 'proof-header' | ||
When I move 'jwk' in 'proof-header' | ||
|
||
## end 2, | ||
|
||
# 3. create jws from proof-header and proof-payload and create proof | ||
|
||
When I create the 'string dictionary' named 'proof' | ||
|
||
When I create the jws signature of header 'proof-header' and payload 'proof-payload' | ||
When I rename the 'jws signature' to 'jwt' | ||
|
||
When I move 'jwt' in 'proof' | ||
When I set 'proof_type' to 'jwt' as 'string' | ||
When I move 'proof_type' in 'proof' | ||
|
||
## end 3. | ||
When I create the 'string dictionary' named 'headers' | ||
When I append 'access_token' to 'Authorization' | ||
and I move 'Authorization' in 'headers' | ||
|
||
When I create the 'string dictionary' named 'data' | ||
and I move 'proof' in 'data' | ||
and I move 'vct' in 'data' | ||
and I move 'format' in 'data' | ||
|
||
Then print the 'data' | ||
Then print the 'authorization_server_credential_endpoint' | ||
Then print the 'headers' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters