Skip to content

Commit dd7445b

Browse files
author
Psilo
committed
add postman collection
1 parent ca51e44 commit dd7445b

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/main/resources/postman_collection.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,12 @@
276276
" const username = encodeURIComponent(pm.variables.get(\"auth-username\"));",
277277
" const password = encodeURIComponent(pm.variables.get(\"auth-password\"));",
278278
" const client_secret = pm.variables.get(\"auth-client-secret\");",
279+
" var cs = \"\"",
280+
" if(client_secret) {",
281+
" cs = \"&client_secret=\" + client_secret",
282+
" }",
279283
" const client_id = pm.variables.get(\"auth-client-id\")",
280-
" const body = \"client_id=\" + client_id + \"&client_secret=\" + client_secret + \"&grant_type=password&username=\" + username + \"&password=\" + password",
284+
" const body = \"client_id=\" + client_id + cs + \"&grant_type=password&username=\" + username + \"&password=\" + password",
281285
" console.log(body)",
282286
" pm.sendRequest({",
283287
" url: pm.variables.get(\"auth-url\"),",
@@ -317,22 +321,17 @@
317321
],
318322
"variable": [
319323
{
320-
"id": "b6f9b509-b8ee-4d55-8242-8d535ecd989c",
324+
"id": "d59744f7-253b-4153-8abe-24c79e608211",
321325
"key": "url",
322326
"value": "http://localhost:8080"
323327
},
324328
{
325-
"id": "a2146746-181e-441b-bf5b-5f3b6fb038da",
329+
"id": "f29301eb-5f34-4e27-80ae-9b0fc72e3cf7",
326330
"key": "auth-url",
327331
"value": "http://10.10.196.4:14888/auth/realms/Nexus/protocol/openid-connect/token"
328332
},
329333
{
330-
"id": "891acf22-1874-4ed2-a7bb-8f4383460346",
331-
"key": "auth-client-secret",
332-
"value": "38a0b40e-b464-4419-9f32-3c6e9972fd68"
333-
},
334-
{
335-
"id": "b50730b7-24ae-45f0-a7e8-c6671cc108dd",
334+
"id": "8e8e8fa0-9bf8-410e-9971-e27b6ad18060",
336335
"key": "auth-client-id",
337336
"value": "clexus"
338337
}

0 commit comments

Comments
 (0)