-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
274df7c
commit fb5d6e7
Showing
20 changed files
with
236 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"request_uri": "urn:ietf:params:oauth:request_uri:1719239545ed9f269e652d207b90dec394b87225c92346023b", | ||
"data": { | ||
"email": "[email protected]" | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"server_data": { | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "SVqB4JcUD6lsfvqMr-OKUNUphdNn64Eay60978ZlL74", | ||
"y": "lf0u0pMj4lGAzZix5u4Cm5CMQIgMNpkwy163wtKYVKI", | ||
"d": "0g5vAEKzugrXaRbgKG0Tj2qJ5lMP4Bezds1_sTybkfk" | ||
}, | ||
"url": "https://valid.issuer.url", | ||
"authentication_url": "https://did.dyne.org/dids/" | ||
} | ||
} |
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,6 @@ | ||
Rule unknown ignore | ||
|
||
Given I send request_uri 'request_uri' and send data 'data' and send server_data 'server' and add data to authorization details and output into 'result' | ||
|
||
Given I have a 'string array' named 'result' | ||
Then print the 'result' |
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,16 @@ | ||
{ | ||
"json_body": { | ||
"grant_type": "authorization_code", | ||
"client_id": "did:dyne:sandbox.genericissuer:6Cp8mPUvJmQaMxQPSnNyhb74f9Ga4WqfXCkBneFgikm5", | ||
"code_verifier": "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk", | ||
"redirect_uri": "https://Wallet.example.org/cb", | ||
"code": "eyJhbGciOiJFUzI1NiIsImp3ayI6eyJrdHkiOiJFQyIsIngiOiJ0R3hhcWJYR3JsNm92VC11NXNWMU1vUFRESG5ZTEtZbkNpZzM0NW5zSmc4IiwieSI6IlFOT3RBRzd4Sm52cHlGS2lGdmJJdFBxaVBiN2VZSVMtQlRvU0YwaHM3NTgiLCJjcnYiOiJQLTI1NiJ9fQ.eyJzdWIiOiI1NDJiYWNjODAyMDUxZTdhYjBjMWZhNDAxZjAwYzhjNWJjN2Y0NzVhIiwiaWF0IjoxNzE5MjQxMTYzLCJpc3MiOiJodHRwczovL2Rldi5hdXRoei1zZXJ2ZXIxLmZvcmtib21iLmV1L2F1dGh6X3NlcnZlciIsImF1ZCI6ImRpZDpkeW5lOnNhbmRib3guc2lnbnJvb206NEtFeW1XZ0xEVWYxTE5ja2V4WTk2ZGZLejV2SDc5ZGlEZWtnTE1SOUZXcEgiLCJleHAiOjE3MTkyNDQ3NjJ9.1OhQ5FKXuh_QWxm4XMufNqFS2Zkql7bmBzfMuT8GzVEil3HzYM7dAwUo5Zl9shu-w7bEGlKkOIhXssVrMeMlXg" | ||
}, | ||
"request": { | ||
"headers": { | ||
"content-length": 42, | ||
"Content-Type": "application/x-www-form-urlencoded", | ||
"DPoP": "eyJhbGciOiJFUzI1NiIsImp3ayI6eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6InpKLTR1d0VWVlYxQW9GcW1yZVlzUlh1SjhGbzVHRVVUeTZ0aklBdjdUcFkiLCJ5IjoiVm9YdmEzVEpHc0o5bjlZVzV3MGplMHp6U2hmYnN3QWd6SHI1TEZCSDNsZyJ9LCJ0eXAiOiJkcG9wK2p3dCJ9.eyJodG0iOiJQT1NUIiwiaHR1IjoiaHR0cHM6Ly9kZXYuYXV0aHotc2VydmVyMS5mb3JrYm9tYi5ldS9hdXRoel9zZXJ2ZXIvdG9rZW4iLCJpYXQiOjE3MTkyNDEzMjYsImp0aSI6IkFad0VwZ2tOTlhrbllWT1JZbjNYNW9HVW1iTVp3V3d1UF9xSDNnOFRjbHcifQ.X2sO6h3GUcTu0h_qNyOsXEB2Z3qzPUd1azOJIeMmfH4zIk-Hd8sHm1RG2RaxZ3n22qSDbKjBap2G9U3Kjw5gLA" | ||
} | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"server_data": { | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "SVqB4JcUD6lsfvqMr-OKUNUphdNn64Eay60978ZlL74", | ||
"y": "lf0u0pMj4lGAzZix5u4Cm5CMQIgMNpkwy163wtKYVKI", | ||
"d": "0g5vAEKzugrXaRbgKG0Tj2qJ5lMP4Bezds1_sTybkfk" | ||
}, | ||
"url": "https://valid.issuer.url", | ||
"authentication_url": "https://did.dyne.org/dids/" | ||
} | ||
} |
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,12 @@ | ||
Rule unknown ignore | ||
Scenario 'http': url encode | ||
|
||
Given I have a 'string dictionary' named 'json_body' | ||
Given I have a 'string dictionary' named 'request' | ||
|
||
When I create the http get parameters from 'json_body' using percent encoding | ||
When I move 'json_body' to 'body' in 'request' | ||
|
||
Then print the 'request' | ||
|
||
Then I send request 'request' and send server_data 'server_data' and generate access token and output into 'result' |
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,8 @@ | ||
{ | ||
"request": { | ||
"body": "client_id=did%3Adyne%3Asandbox%2Egenericissuer%3A6Cp8mPUvJmQaMxQPSnNyhb74f9Ga4WqfXCkBneFgikm5&request_uri=urn%3Aietf%3Aparams%3Aoauth%3Arequest_uri%3A1719239545ed9f269e652d207b90dec394b87225c92346023b", | ||
"headers": { | ||
"Authorization": "" | ||
} | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"server_data": { | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "SVqB4JcUD6lsfvqMr-OKUNUphdNn64Eay60978ZlL74", | ||
"y": "lf0u0pMj4lGAzZix5u4Cm5CMQIgMNpkwy163wtKYVKI", | ||
"d": "0g5vAEKzugrXaRbgKG0Tj2qJ5lMP4Bezds1_sTybkfk" | ||
}, | ||
"url": "https://valid.issuer.url", | ||
"authentication_url": "https://did.dyne.org/dids/" | ||
} | ||
} |
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,6 @@ | ||
Rule unknown ignore | ||
|
||
Given I send request 'request' and send server_data 'server' and generate authorization code and output into 'result' | ||
|
||
Given I have a 'string dictionary' named 'result' | ||
Then print the 'result' |
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,10 @@ | ||
{ | ||
"client": { | ||
"id": "did:dyne:sandbox.genericissuer:6Cp8mPUvJmQaMxQPSnNyhb74f9Ga4WqfXCkBneFgikm5", | ||
"clientSecret": "eyJhbGciOiJFUzI1NiJ9.eyJzdWIiOiJwaXBwbyJ9.hiVPL2JTdmcZY7Vcso95KUBEzcTGvmvQ7wlwkCo0G74Unpzny2drvLsu-HzHWyckKbRjwWox-V5gqqKeka8kEQ", | ||
"grants": ["authorization_code"], | ||
"redirectUris": ["https://Wallet.example.org/cb"], | ||
"scope": ["Auth1"], | ||
"resource": "http://issuer1.zenswarm.forkbomb.eu/credential_issuer" | ||
} | ||
} |
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,22 @@ | ||
{ | ||
"server_data": { | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "SVqB4JcUD6lsfvqMr-OKUNUphdNn64Eay60978ZlL74", | ||
"y": "lf0u0pMj4lGAzZix5u4Cm5CMQIgMNpkwy163wtKYVKI", | ||
"d": "0g5vAEKzugrXaRbgKG0Tj2qJ5lMP4Bezds1_sTybkfk" | ||
}, | ||
"url": "https://valid.issuer.url", | ||
"authentication_url": "https://did.dyne.org/dids/" | ||
}, | ||
"expires_in": 500, | ||
"request": { | ||
"body": "response_type=code&client_id=did:dyne:sandbox.genericissuer:6Cp8mPUvJmQaMxQPSnNyhb74f9Ga4WqfXCkBneFgikm5&state=xyz&code_challenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM&code_challenge_method=S256&redirect_uri=https%3A%2F%2FWallet.example.org%2Fcb&authorization_details=%5B%7B%22type%22%3A%20%22openid_credential%22%2C%20%22credential_configuration_id%22%3A%20%22Auth1%22%2C%22locations%22%3A%20%5B%22http%3A%2F%2Fissuer1.zenswarm.forkbomb.eu%3A3100%2Fcredential_issuer%2F%22%5D%7D%5D", | ||
"headers": { | ||
"Authorization": "" | ||
} | ||
} | ||
} | ||
|
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,6 @@ | ||
Rule unknown ignore | ||
|
||
Given I send request 'request' and send client 'client' and send server_data 'server_data' and send expires_in 'expires_in' and generate request uri and output into 'result' | ||
|
||
Given I have a 'string dictionary' named 'result' | ||
Then print the 'result' |
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,3 @@ | ||
{ | ||
"token": "eyJhbGciOiJFUzI1NiIsImp3ayI6eyJrdHkiOiJFQyIsIngiOiJ0R3hhcWJYR3JsNm92VC11NXNWMU1vUFRESG5ZTEtZbkNpZzM0NW5zSmc4IiwieSI6IlFOT3RBRzd4Sm52cHlGS2lGdmJJdFBxaVBiN2VZSVMtQlRvU0YwaHM3NTgiLCJjcnYiOiJQLTI1NiJ9fQ.eyJzdWIiOiJjYzA3N2Y4MTcwMWU3NDIxNTQ5ZmU0MjBiNDFiNTUxMjVlZDljNmZlIiwiaWF0IjoxNzE5MjQxMzI3LCJpc3MiOiJodHRwczovL2Rldi5hdXRoei1zZXJ2ZXIxLmZvcmtib21iLmV1L2F1dGh6X3NlcnZlciIsImF1ZCI6ImRpZDpkeW5lOnNhbmRib3guc2lnbnJvb206NEtFeW1XZ0xEVWYxTE5ja2V4WTk2ZGZLejV2SDc5ZGlEZWtnTE1SOUZXcEgiLCJleHAiOjE3MTkyNDQ5Mjd9.xLWyO9DkLnSU-9w_4kzmI-znQAwlYJnBbZXpKqmHNpwnFwJUdK26hmVgIQSy2HcHujKyaXX6unjmFe1P5HyK9A" | ||
} |
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,5 @@ | ||
{ | ||
"server": { | ||
"url": "https://valid.issuer.url" | ||
} | ||
} |
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,6 @@ | ||
Rule unknown ignore | ||
|
||
Given I send token 'token' and send server_data 'server' and get authorization details from token and output into 'result' | ||
|
||
Given I have a 'string array' named 'result' | ||
Then print data |
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,49 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2024 Dyne.org foundation | ||
SPDX-License-Identifier: CC-BY-NC-SA-4.0 | ||
--> | ||
|
||
## oauth plugin examples | ||
|
||
### generate request uri | ||
::: code-group | ||
<<< @/examples/oauth/gen_request_uri.zen{3 gherkin:line-numbers} | ||
<<< @/examples/oauth/gen_request_uri.data{json} | ||
<<< @/examples/oauth/gen_request_uri.keys{json} | ||
::: | ||
|
||
### verify request parameters | ||
::: code-group | ||
<<< @/examples/oauth/ver_request_params.zen{15 gherkin:line-numbers} | ||
<<< @/examples/oauth/ver_request_params.data{json} | ||
<<< @/examples/oauth/ver_request_params.keys{json} | ||
::: | ||
|
||
### add data to authorization details | ||
::: code-group | ||
<<< @/examples/oauth/add_data.zen{3 gherkin:line-numbers} | ||
<<< @/examples/oauth/add_data.data{json} | ||
<<< @/examples/oauth/add_data.keys{json} | ||
::: | ||
|
||
### generate authorization code | ||
::: code-group | ||
<<< @/examples/oauth/gen_auth_code.zen{3 gherkin:line-numbers} | ||
<<< @/examples/oauth/gen_auth_code.data{json} | ||
<<< @/examples/oauth/gen_auth_code.keys{json} | ||
::: | ||
|
||
### generate access token | ||
::: code-group | ||
<<< @/examples/oauth/gen_access_token.zen{12 gherkin:line-numbers} | ||
<<< @/examples/oauth/gen_access_token.data{json} | ||
<<< @/examples/oauth/gen_access_token.keys{json} | ||
::: | ||
|
||
### get authorization details | ||
::: code-group | ||
<<< @/examples/oauth/get_auth_details.zen{3 gherkin:line-numbers} | ||
<<< @/examples/oauth/get_auth_details.data{json} | ||
<<< @/examples/oauth/get_auth_details.keys{json} | ||
::: |
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,9 @@ | ||
{ | ||
"client_id": "did:dyne:sandbox.genericissuer:6Cp8mPUvJmQaMxQPSnNyhb74f9Ga4WqfXCkBneFgikm5", | ||
"request_uri": "urn:ietf:params:oauth:request_uri:1719239545ed9f269e652d207b90dec394b87225c92346023b", | ||
"request": { | ||
"headers": { | ||
"Authorization": "" | ||
} | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"server_data": { | ||
"jwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"alg": "ES256", | ||
"x": "SVqB4JcUD6lsfvqMr-OKUNUphdNn64Eay60978ZlL74", | ||
"y": "lf0u0pMj4lGAzZix5u4Cm5CMQIgMNpkwy163wtKYVKI", | ||
"d": "0g5vAEKzugrXaRbgKG0Tj2qJ5lMP4Bezds1_sTybkfk" | ||
}, | ||
"url": "https://valid.issuer.url", | ||
"authentication_url": "https://did.dyne.org/dids/" | ||
} | ||
} |
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,15 @@ | ||
Rule unknown ignore | ||
|
||
Given I have a 'string' named 'client_id' | ||
Given I have a 'string' named 'request_uri' | ||
Given I have a 'string dictionary' named 'request' | ||
|
||
When I set 'body' to 'client_id=' as 'string' | ||
When I append the 'client_id' to 'body' | ||
When I append the string '&request_uri=' to 'body' | ||
When I append the 'request_uri' to 'body' | ||
When I move 'body' in 'request' | ||
|
||
Then print the 'request' | ||
|
||
Then I send request 'request' and send server_data 'server_data' and verify request parameters |