diff --git a/postman/auth.collection.json b/postman/auth.collection.json new file mode 100644 index 0000000..13b7665 --- /dev/null +++ b/postman/auth.collection.json @@ -0,0 +1,298 @@ +{ + "info": { + "_postman_id": "1cb5ef5a-b707-4e19-a271-fc1522a87ef6", + "name": "Compas Auth", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "1434829" + }, + "item": [ + { + "name": "Get JWT (SCL Data Editor)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "let responseData=pm.response.json();", + "pm.environment.set(\"bearer\", responseData.access_token);", + "", + "let template = `", + "", + "", + " ", + " ", + "", + "", + "
", + "
", + "
Bearer ${pm.environment.get('bearer')}
", + "
", + " ", + "
", + "", + "", + "`;", + "", + "pm.visualizer.set(template, pm.response.json());", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "grant_type", + "value": "password", + "type": "text" + }, + { + "key": "client_id", + "value": "openscd", + "type": "text" + }, + { + "key": "username", + "value": "scl-data-editor", + "type": "text" + }, + { + "key": "password", + "value": "editor", + "type": "text" + } + ] + }, + "url": { + "raw": "{{authUrl}}/realms/compas/protocol/openid-connect/token", + "host": [ + "{{authUrl}}" + ], + "path": [ + "realms", + "compas", + "protocol", + "openid-connect", + "token" + ] + } + }, + "response": [] + }, + { + "name": "Get JWT (SCL Data Reader)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "let responseData=pm.response.json();", + "pm.environment.set(\"bearer\", responseData.access_token);", + "", + "let template = `", + "", + "", + " ", + " ", + "", + "", + "
", + "
", + "
${pm.environment.get('bearer')}
", + "
", + " ", + "
", + "", + "", + "`;", + "", + "pm.visualizer.set(template, pm.response.json());", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "grant_type", + "value": "password", + "type": "text" + }, + { + "key": "client_id", + "value": "openscd", + "type": "text" + }, + { + "key": "username", + "value": "scl-data-reader", + "type": "text" + }, + { + "key": "password", + "value": "reader", + "type": "text" + } + ] + }, + "url": { + "raw": "{{authUrl}}/realms/compas/protocol/openid-connect/token", + "host": [ + "{{authUrl}}" + ], + "path": [ + "realms", + "compas", + "protocol", + "openid-connect", + "token" + ] + } + }, + "response": [] + }, + { + "name": "Get JWT (SCD Reader)", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "let responseData=pm.response.json();", + "pm.environment.set(\"bearer\", responseData.access_token);", + "", + "let template = `", + "", + "", + " ", + " ", + "", + "", + "
", + "
", + "
${pm.environment.get('bearer')}
", + "
", + " ", + "
", + "", + "", + "`;", + "", + "pm.visualizer.set(template, pm.response.json());", + "" + ], + "type": "text/javascript" + } + } + ], + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "urlencoded", + "urlencoded": [ + { + "key": "grant_type", + "value": "password", + "type": "text" + }, + { + "key": "client_id", + "value": "openscd", + "type": "text" + }, + { + "key": "username", + "value": "scd-reader", + "type": "text" + }, + { + "key": "password", + "value": "reader", + "type": "text" + } + ] + }, + "url": { + "raw": "{{authUrl}}/realms/compas/protocol/openid-connect/token", + "host": [ + "{{authUrl}}" + ], + "path": [ + "realms", + "compas", + "protocol", + "openid-connect", + "token" + ] + } + }, + "response": [] + } + ] +} \ No newline at end of file diff --git a/postman/auth.collection.json.license b/postman/auth.collection.json.license new file mode 100644 index 0000000..a772fef --- /dev/null +++ b/postman/auth.collection.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Alliander N.V. + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/postman/docker-compose.environment.json b/postman/docker-compose.environment.json new file mode 100644 index 0000000..5c506ec --- /dev/null +++ b/postman/docker-compose.environment.json @@ -0,0 +1,39 @@ +{ + "id": "42022eb4-7cc9-483c-919f-145bb2c5ba61", + "name": "Docker Compose", + "values": [ + { + "key": "sclDataServiceBaseUrl", + "value": "http://localhost:9090/compas-scl-data-service", + "enabled": true + }, + { + "key": "cimMappingBaseUrl", + "value": "http://localhost:9091/compas-cim-mapping", + "enabled": true + }, + { + "key": "authUrl", + "value": "http://localhost:8089/auth", + "enabled": true + }, + { + "key": "bearer", + "value": "", + "enabled": true + }, + { + "key": "sclAutoAlignServiceBaseUrl", + "value": "http://localhost:9092/compas-scl-auto-alignment", + "enabled": true + }, + { + "key": "sclValidatorBaseUrl", + "value": "http://localhost:9093/compas-scl-validator", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2022-07-11T08:51:37.380Z", + "_postman_exported_using": "Postman/9.24.1" +} \ No newline at end of file diff --git a/postman/docker-compose.environment.json.license b/postman/docker-compose.environment.json.license new file mode 100644 index 0000000..a772fef --- /dev/null +++ b/postman/docker-compose.environment.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Alliander N.V. + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file diff --git a/postman/local.environment.json b/postman/local.environment.json new file mode 100644 index 0000000..f2ec538 --- /dev/null +++ b/postman/local.environment.json @@ -0,0 +1,39 @@ +{ + "id": "bf50c1be-fa5a-4b32-b372-098bc6190d42", + "name": "Local", + "values": [ + { + "key": "sclDataServiceBaseUrl", + "value": "http://localhost:9090/compas-scl-data-service", + "enabled": true + }, + { + "key": "cimMappingBaseUrl", + "value": "http://localhost:9091/compas-cim-mapping", + "enabled": true + }, + { + "key": "authUrl", + "value": "http://localhost:8089/auth", + "enabled": true + }, + { + "key": "bearer", + "value": "", + "enabled": true + }, + { + "key": "sclAutoAlignServiceBaseUrl", + "value": "http://localhost:9092/compas-scl-auto-alignment", + "enabled": true + }, + { + "key": "sclValidatorBaseUrl", + "value": "http://localhost:9093/compas-scl-validator", + "enabled": true + } + ], + "_postman_variable_scope": "environment", + "_postman_exported_at": "2022-07-11T08:50:55.958Z", + "_postman_exported_using": "Postman/9.24.1" +} \ No newline at end of file diff --git a/postman/local.environment.json.license b/postman/local.environment.json.license new file mode 100644 index 0000000..a772fef --- /dev/null +++ b/postman/local.environment.json.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2022 Alliander N.V. + +SPDX-License-Identifier: Apache-2.0 \ No newline at end of file