-
Notifications
You must be signed in to change notification settings - Fork 8
/
pid-issuer.http
147 lines (114 loc) · 3.97 KB
/
pid-issuer.http
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
### Create MSO MDOC
POST {{issuer_pid_mso_mdoc_encoderUrl}}
Accept: application/json
Content-Type: application/json
{
"version": "0.3",
"country": "FC",
"doctype": "eu.europa.ec.eudi.pid.1",
"device_publickey": "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFUEdUSll1ajQybE5BUVpTSjQ2TnRiVDU0UUR4dgp3NTRCRDdLN2pTVUVNYmhvbHVwMDVScTFZV1NaVnVZbzdGc1RRMUIwOXFLNVN1bElJNjN4SnMrbWpnPT0KLS0tLS1FTkQgUFVCTElDIEtFWS0tLS0tCg==",
"data": {
"eu.europa.ec.eudi.pid.1": {
"given_name": "javier",
"family_name": "Garcia",
"birth_date": "1965-01-01",
"is_over_18": true,
"issuance_date": "2023-07-19",
"expiry_date": "2023-08-19",
"issuing_authority": "Some authority",
"issuing_country": "FC"
}
}
}
### Get Issuer JWK Set
GET {{issuer_publicUrl}}/.well-known/jwks.json
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
client.global.set("keys", response.body.keys);
%}
### Get Issuer MetaData
GET {{issuer_publicUrl}}/.well-known/openid-credential-issuer
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
client.global.set("issuer_authorizationServer", response.body.authorization_server);
client.global.set("credential_endpoint", response.body.credential_endpoint)
client.global.set("deferred_credential_endpoint", response.body.deferred_credential_endpoint)
%}
### Get sample credentials offer
GET {{issuer_publicUrl}}/issuer/credentialsOffer
<> 2023-10-03T103112.200.json
### Get OAUTH2 server MetaData
GET {{issuer_authorizationServer}}/.well-known/openid-configuration
Accept: application/json
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
client.global.set("token_endpoint", response.body.token_endpoint);
client.global.set("userinfo_endpoint", response.body.userinfo_endpoint);
%}
### Login (Resource owner grant)
POST {{token_endpoint}}
Content-Type: application/x-www-form-urlencoded
grant_type = password &
username = {{user_username}} &
password = {{user_password}} &
scope = {{request_scope}} &
client_id = {{user_client_id}}
> {%
client.test("Request executed successfully", function () {
client.assert(response.status === 200, "Response status is not 200");
});
client.global.set("id_token", response.body.id_token);
client.global.set("access_token", response.body.access_token);
%}
### Get userinfo data from OAUTH2 server
GET {{userinfo_endpoint}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{access_token}}
### Get userinfo from Issuer
GET {{credential_endpoint}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{access_token}}
### Request PID (mso_mdoc)
POST {{credential_endpoint}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{access_token}}
{
"format": "mso_mdoc",
"doctype": "eu.europa.ec.eudi.pid.1",
"proof": {
"proof_type": "jwt",
"jwt": "123321231"
}
}
### Request PID (SD-JWT-VC)
POST {{credential_endpoint}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{access_token}}
{
"format": "vc+sd-jwt",
"credential_definition": {
"type": "eu.europa.ec.eudi.pid.1"
},
"proof": {
"proof_type": "jwt",
"jwt": "eyJraWQiOiJkaWQ6ZXhhbXBsZTplYmZlYjFmNzEyZWJjNmYxYzI3NmUxMmVjMjEva2V5cy8xIiwiYWxnIjoiRVMyNTYiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJzNkJoZFJrcXQzIiwiYXVkIjoiaHR0cHM6Ly9zZXJ2ZXIuZXhhbXBsZS5jb20iLCJpYXQiOiIyMDE4LTA5LTE0VDIxOjE5OjEwWiIsIm5vbmNlIjoidFppZ25zbkZicCJ9.ewdkIkPV50iOeBUqMXCC_aZKPxgihac0aW9EkL1nOzM"
}
}
### Check deferred
POST {{deferred_credential_endpoint}}
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{access_token}}
{
"transaction_id" : "foo"
}