diff --git a/.env b/.env
new file mode 100644
index 0000000..3919ee7
--- /dev/null
+++ b/.env
@@ -0,0 +1,15 @@
+IDENTITY_URL="https://identity.keycloak.develop.eoepca.org"
+REALM="master"
+CLIENT_ID="eoepca-portal"
+IDENTITY_API_URL="https://identity.api.develop.eoepca.org"
+ADES_URL="https://ades.develop.eoepca.org/ogc-api/processes"
+RESOURCE_CATALOGUE_URL="https://resource-catalogue.develop.eoepca.org"
+DATA_ACCESS_URL="https://data-access.develop.eoepca.org"
+WORKSPACE_URL="https://workspace-api.develop.eoepca.org"
+WORKSPACE_DOCS_URL="https://workspace-api.develop.eoepca.org/docs#"
+IMAGES_REGISTRY_URL="https://harbor.develop.eoepca.org"
+DUMMY_SERVICE_URL="https://identity.dummy-service.develop.eoepca.org"
+ACCESS_TOKEN_NAME="auth_user_id"
+ACCESS_TOKEN_DOMAIN=".develop.eoepca.org"
+REFRESH_TOKEN_NAME="auth_refresh_token"
+REFRESH_TOKEN_DOMAIN=".develop.eoepca.org"
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 97921e5..fc2d678 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,10 +8,12 @@ RUN npm i -g @angular/cli
RUN npm i
COPY . .
-ARG CONFIGURATION=develop
-RUN ng build --configuration=$CONFIGURATION
+RUN ng build
### STAGE 2: Run ###
FROM nginx:stable-alpine
COPY nginx.conf /etc/nginx/nginx.conf
-COPY --from=build /usr/src/app/dist/* /usr/share/nginx/html
\ No newline at end of file
+COPY --from=build /usr/src/app/dist/* /usr/share/nginx/html
+WORKDIR /start
+COPY ./start.sh .
+CMD [ "sh", "start.sh" ]
\ No newline at end of file
diff --git a/angular.json b/angular.json
index af7be11..c0cc721 100644
--- a/angular.json
+++ b/angular.json
@@ -15,7 +15,7 @@
"prefix": "app",
"architect": {
"build": {
- "builder": "@angular-devkit/build-angular:browser",
+ "builder": "@ngx-env/builder:browser",
"options": {
"outputPath": "dist/eoepca-portal",
"index": "src/index.html",
@@ -27,12 +27,16 @@
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
- "src/assets"
+ "src/assets",
+ "src/config"
],
"styles": [
"src/styles.scss"
],
- "scripts": []
+ "scripts": [],
+ "ngxEnv": {
+ "prefix": "EOEPCA_"
+ }
},
"configurations": {
"production": {
@@ -48,76 +52,7 @@
"maximumError": "4kb"
}
],
- "outputHashing": "all",
- "fileReplacements": [
- {
- "replace": "src/environments/environment.ts",
- "with": "src/environments/environment.production.ts"
- }
- ]
- },
- "staging": {
- "budgets": [
- {
- "type": "initial",
- "maximumWarning": "500kb",
- "maximumError": "1mb"
- },
- {
- "type": "anyComponentStyle",
- "maximumWarning": "2kb",
- "maximumError": "4kb"
- }
- ],
- "outputHashing": "all",
- "fileReplacements": [
- {
- "replace": "src/environments/environment.ts",
- "with": "src/environments/environment.staging.ts"
- }
- ]
- },
- "demo": {
- "budgets": [
- {
- "type": "initial",
- "maximumWarning": "500kb",
- "maximumError": "1mb"
- },
- {
- "type": "anyComponentStyle",
- "maximumWarning": "2kb",
- "maximumError": "4kb"
- }
- ],
- "outputHashing": "all",
- "fileReplacements": [
- {
- "replace": "src/environments/environment.ts",
- "with": "src/environments/environment.demo.ts"
- }
- ]
- },
- "develop": {
- "budgets": [
- {
- "type": "initial",
- "maximumWarning": "500kb",
- "maximumError": "1mb"
- },
- {
- "type": "anyComponentStyle",
- "maximumWarning": "2kb",
- "maximumError": "4kb"
- }
- ],
- "outputHashing": "all",
- "fileReplacements": [
- {
- "replace": "src/environments/environment.ts",
- "with": "src/environments/environment.develop.ts"
- }
- ]
+ "outputHashing": "all"
},
"development": {
"buildOptimizer": false,
@@ -127,35 +62,22 @@
"sourceMap": true,
"namedChunks": true
}
- },
- "defaultConfiguration": "production"
+ }
},
"serve": {
- "builder": "@angular-devkit/build-angular:dev-server",
+ "builder": "@ngx-env/builder:dev-server",
"configurations": {
- "production": {
- "browserTarget": "eoepca-portal:build:production"
- },
- "demo": {
- "browserTarget": "eoepca-portal:build:demo"
- },
- "staging": {
- "browserTarget": "eoepca-portal:build:staging"
- },
- "develop": {
- "browserTarget": "eoepca-portal:build:develop"
- }
},
"defaultConfiguration": "develop"
},
"extract-i18n": {
- "builder": "@angular-devkit/build-angular:extract-i18n",
+ "builder": "@ngx-env/builder:extract-i18n",
"options": {
"browserTarget": "eoepca-portal:build"
}
},
"test": {
- "builder": "@angular-devkit/build-angular:karma",
+ "builder": "@ngx-env/builder:karma",
"options": {
"polyfills": [
"zone.js",
@@ -165,7 +87,8 @@
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.ico",
- "src/assets"
+ "src/assets",
+ "src/config"
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
diff --git a/charts/eoepca-portal/templates/configmap.yaml b/charts/eoepca-portal/templates/configmap.yaml
new file mode 100644
index 0000000..2bb3c66
--- /dev/null
+++ b/charts/eoepca-portal/templates/configmap.yaml
@@ -0,0 +1,23 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "eoepca-portal.name" . }}
+ labels:
+ {{- include "eoepca-portal.labels" . | nindent 4 }}
+data:
+ AUTH_SERVER_URL: "{{ .Values.configMap.auth_server_url }}"
+ IDENTITY_URL: "{{ .Values.configMap.identity_url }}"
+ REALM: "{{ .Values.configMap.realm }}"
+ CLIENT_ID: "{{ .Values.configMap.client_id }}"
+ IDENTITY_API_URL: "{{ .Values.configMap.identity_api_url }}"
+ ADES_URL: "{{ .Values.configMap.ades_url }}"
+ RESOURCE_CATALOGUE_URL: "{{ .Values.configMap.resource_catalogue_url }}"
+ DATA_ACCESS_URL: "{{ .Values.configMap.data_access_url }}"
+ WORKSPACE_URL: "{{ .Values.configMap.workspace_url }}"
+ WORKSPACE_DOCS_URL: "{{ .Values.configMap.workspace_docs_url }}"
+ IMAGES_REGISTRY_URL: "{{ .Values.configMap.images_registry_url }}"
+ DUMMY_SERVICE_URL: "{{ .Values.configMap.dummy_service_url }}"
+ ACCESS_TOKEN_NAME: "{{ .Values.configMap.access_token_name }}"
+ ACCESS_TOKEN_DOMAIN: "{{ .Values.configMap.access_token_domain }}"
+ REFRESH_TOKEN_NAME: "{{ .Values.configMap.refresh_token_name }}"
+ REFRESH_TOKEN_DOMAIN: "{{ .Values.configMap.refresh_token_domain }}"
\ No newline at end of file
diff --git a/charts/eoepca-portal/templates/deployment.yaml b/charts/eoepca-portal/templates/deployment.yaml
index 0888cd0..b0c0fcc 100644
--- a/charts/eoepca-portal/templates/deployment.yaml
+++ b/charts/eoepca-portal/templates/deployment.yaml
@@ -43,6 +43,8 @@ spec:
{{- with .Values.deployment.extraEnvFrom }}
{{- tpl . $ | nindent 12 }}
{{- end }}
+ - configMapRef:
+ name: {{ include "eoepca-portal.name" . }}
ports:
- name: http
containerPort: {{ .Values.deployment.containerPort }}
diff --git a/charts/eoepca-portal/values.yaml b/charts/eoepca-portal/values.yaml
index 7c2d7f7..878e9c9 100644
--- a/charts/eoepca-portal/values.yaml
+++ b/charts/eoepca-portal/values.yaml
@@ -112,4 +112,22 @@ serviceAccount:
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
- name: ""
\ No newline at end of file
+ name: ""
+
+configMap:
+ auth_server_url: "https://identity.keycloak.develop.eoepca.org"
+ identity_url: "master"
+ realm: "eoepca-portal"
+ client_id: "eoepca-portal"
+ identity_api_url: "https://identity.api.develop.eoepca.org"
+ ades_url: "https://ades.develop.eoepca.org/ogc-api/processes"
+ resource_catalogue_url: "https://resource-catalogue.develop.eoepca.org"
+ data_access_url: "https://data-access.develop.eoepca.org"
+ workspace_url: "https://workspace-api.develop.eoepca.org"
+ workspace_docs_url: "https://workspace-api.develop.eoepca.org/docs#"
+ images_registry_url: "https://harbor.develop.eoepca.org"
+ dummy_service_url: "https://identity.dummy-service.develop.eoepca.org"
+ access_token_name: "auth_user_id"
+ access_token_domain: ".develop.eoepca.org"
+ refresh_token_name: "auth_refresh_token"
+ refresh_token_domain: ".develop.eoepca.org"
\ No newline at end of file
diff --git a/docker-compose.yaml b/docker-compose.yaml
index 6d6f07d..bc55d44 100644
--- a/docker-compose.yaml
+++ b/docker-compose.yaml
@@ -3,7 +3,21 @@ services:
eoepca-portal:
build: .
container_name: eoepca-portal
- environment:
- - CONFIGURATION=develop
ports:
- - '80:80'
\ No newline at end of file
+ - '80:80'
+ environment:
+ - IDENTITY_URL=${IDENTITY_URL}
+ - REALM=${REALM}
+ - CLIENT_ID=${CLIENT_ID}
+ - IDENTITY_API_URL=${IDENTITY_API_URL}
+ - ADES_URL=${ADES_URL}
+ - RESOURCE_CATALOGUE_URL=${RESOURCE_CATALOGUE_URL}
+ - DATA_ACCESS_URL=${DATA_ACCESS_URL}
+ - WORKSPACE_URL=${WORKSPACE_URL}
+ - WORKSPACE_DOCS_URL=${WORKSPACE_DOCS_URL}
+ - IMAGES_REGISTRY_URL=${IMAGES_REGISTRY_URL}
+ - DUMMY_SERVICE_URL=${DUMMY_SERVICE_URL}
+ - ACCESS_TOKEN_NAME=${ACCESS_TOKEN_NAME}
+ - ACCESS_TOKEN_DOMAIN=${ACCESS_TOKEN_DOMAIN}
+ - REFRESH_TOKEN_NAME=${REFRESH_TOKEN_NAME}
+ - REFRESH_TOKEN_DOMAIN=${REFRESH_TOKEN_DOMAIN}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index 5d2a385..fc01887 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,7 +38,9 @@
"@angular-devkit/build-angular": "^16.1.4",
"@angular/cli": "~16.1.4",
"@angular/compiler-cli": "^16.1.0",
+ "@ngx-env/builder": "^17.2.1",
"@types/jasmine": "~4.3.0",
+ "@types/node": "^20.11.19",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
@@ -2457,6 +2459,173 @@
"node": ">=10.0.0"
}
},
+ "node_modules/@dotenv-run/core": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@dotenv-run/core/-/core-1.3.4.tgz",
+ "integrity": "sha512-U/jCYwpzaRjKPhuMj5VdIiIFiIBtiX7lqkyqA+WjpG6S1j91N+5c6LOPUYC54b/N6bKr+fmTj9f05CpWRIuPXw==",
+ "dev": true,
+ "dependencies": {
+ "chalk": "^4.1.0",
+ "dotenv": "^16.1.4",
+ "dotenv-expand": "^10.0.0",
+ "find-up": "^5.0.0"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dev": true,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "node_modules/@dotenv-run/core/node_modules/find-up": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
+ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
+ "dev": true,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/locate-path": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
+ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
+ "dev": true,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/p-limit": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
+ "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
+ "dev": true,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/p-locate": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
+ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
+ "dev": true,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/supports-color": {
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+ "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@dotenv-run/core/node_modules/yocto-queue": {
+ "version": "0.1.0",
+ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
+ "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@dotenv-run/webpack": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@dotenv-run/webpack/-/webpack-1.3.4.tgz",
+ "integrity": "sha512-2QAH9q2iXhYk9l9lV1htAw5Qvwyyjp7Cg26t8j4RsFcO9NRr+TguKsoYUWI+HALvhFiEb/T07cFCUvaxv9APeQ==",
+ "dev": true,
+ "dependencies": {
+ "@dotenv-run/core": "^1.3.4"
+ },
+ "peerDependencies": {
+ "webpack": "^5.0.0"
+ }
+ },
"node_modules/@esbuild/android-arm": {
"version": "0.18.17",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.17.tgz",
@@ -3091,6 +3260,487 @@
"webpack": "^5.54.0"
}
},
+ "node_modules/@ngx-env/builder": {
+ "version": "17.2.1",
+ "resolved": "https://registry.npmjs.org/@ngx-env/builder/-/builder-17.2.1.tgz",
+ "integrity": "sha512-X/HyXGGO51GAyQRgPn7L70aqX/6W5tyQg+/qRQUqRsN2Arsv42/tFgVGf1+58blZvKWxeNwp45UDnXdDv05GSg==",
+ "dev": true,
+ "dependencies": {
+ "@dotenv-run/esbuild": "^1.3.4",
+ "@dotenv-run/webpack": "^1.3.4",
+ "glob": "^10.3.10"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@dotenv-run/esbuild": {
+ "version": "1.3.4",
+ "resolved": "https://registry.npmjs.org/@dotenv-run/esbuild/-/esbuild-1.3.4.tgz",
+ "integrity": "sha512-wc7dhnST+PrzliNZilyDCaLFjYbvlvaL8wafSLb311/ylFafJLLv+i8sABUfG+/iEKZerrTMAJj5rw55VxZsNA==",
+ "dev": true,
+ "dependencies": {
+ "@dotenv-run/core": "^1.3.4"
+ },
+ "peerDependencies": {
+ "esbuild": "0.19.5"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/android-arm": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
+ "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/android-arm64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
+ "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/android-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
+ "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/darwin-arm64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
+ "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/darwin-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
+ "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
+ "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/freebsd-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
+ "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-arm": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
+ "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-arm64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
+ "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-ia32": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
+ "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-loong64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
+ "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-mips64el": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
+ "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-ppc64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
+ "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-riscv64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
+ "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-s390x": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
+ "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/linux-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
+ "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/netbsd-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
+ "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/openbsd-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
+ "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/sunos-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
+ "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/win32-arm64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
+ "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/win32-ia32": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
+ "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/@esbuild/win32-x64": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
+ "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "peer": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/esbuild": {
+ "version": "0.19.5",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
+ "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
+ "dev": true,
+ "hasInstallScript": true,
+ "peer": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.19.5",
+ "@esbuild/android-arm64": "0.19.5",
+ "@esbuild/android-x64": "0.19.5",
+ "@esbuild/darwin-arm64": "0.19.5",
+ "@esbuild/darwin-x64": "0.19.5",
+ "@esbuild/freebsd-arm64": "0.19.5",
+ "@esbuild/freebsd-x64": "0.19.5",
+ "@esbuild/linux-arm": "0.19.5",
+ "@esbuild/linux-arm64": "0.19.5",
+ "@esbuild/linux-ia32": "0.19.5",
+ "@esbuild/linux-loong64": "0.19.5",
+ "@esbuild/linux-mips64el": "0.19.5",
+ "@esbuild/linux-ppc64": "0.19.5",
+ "@esbuild/linux-riscv64": "0.19.5",
+ "@esbuild/linux-s390x": "0.19.5",
+ "@esbuild/linux-x64": "0.19.5",
+ "@esbuild/netbsd-x64": "0.19.5",
+ "@esbuild/openbsd-x64": "0.19.5",
+ "@esbuild/sunos-x64": "0.19.5",
+ "@esbuild/win32-arm64": "0.19.5",
+ "@esbuild/win32-ia32": "0.19.5",
+ "@esbuild/win32-x64": "0.19.5"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/glob": {
+ "version": "10.3.10",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
+ "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
+ "dev": true,
+ "dependencies": {
+ "foreground-child": "^3.1.0",
+ "jackspeak": "^2.3.5",
+ "minimatch": "^9.0.1",
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
+ "path-scurry": "^1.10.1"
+ },
+ "bin": {
+ "glob": "dist/esm/bin.mjs"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/@ngx-env/builder/node_modules/minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
"node_modules/@nodelib/fs.scandir": {
"version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@@ -3559,12 +4209,12 @@
"dev": true
},
"node_modules/@types/node": {
- "version": "20.8.6",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.8.6.tgz",
- "integrity": "sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==",
+ "version": "20.11.19",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.19.tgz",
+ "integrity": "sha512-7xMnVEcZFu0DikYjWOlRq7NTPETrm7teqUT2WkQjrTIkEgUyyGdWsj/Zg8bEJt5TNklzbPD1X3fqfsHw3SpapQ==",
"dev": true,
"dependencies": {
- "undici-types": "~5.25.1"
+ "undici-types": "~5.26.4"
}
},
"node_modules/@types/qs": {
@@ -5662,6 +6312,27 @@
"url": "https://github.com/fb55/domutils?sponsor=1"
}
},
+ "node_modules/dotenv": {
+ "version": "16.4.5",
+ "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
+ "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://dotenvx.com"
+ }
+ },
+ "node_modules/dotenv-expand": {
+ "version": "10.0.0",
+ "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-10.0.0.tgz",
+ "integrity": "sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ }
+ },
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
@@ -11899,9 +12570,9 @@
}
},
"node_modules/undici-types": {
- "version": "5.25.3",
- "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.25.3.tgz",
- "integrity": "sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==",
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/unicode-canonical-property-names-ecmascript": {
diff --git a/package.json b/package.json
index 9f7c49f..8f495cf 100644
--- a/package.json
+++ b/package.json
@@ -5,12 +5,8 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
- "watch": "ng build --watch --configuration develop",
- "test": "ng test",
- "start:production": "ng serve --configuration=production",
- "start:staging": "ng serve --configuration=staging",
- "start:demo": "ng serve --configuration=demo",
- "start:develop": "ng serve --configuration=develop"
+ "watch": "ng build --watch",
+ "test": "ng test"
},
"private": true,
"dependencies": {
@@ -44,7 +40,9 @@
"@angular-devkit/build-angular": "^16.1.4",
"@angular/cli": "~16.1.4",
"@angular/compiler-cli": "^16.1.0",
+ "@ngx-env/builder": "^17.2.1",
"@types/jasmine": "~4.3.0",
+ "@types/node": "^20.11.19",
"jasmine-core": "~4.6.0",
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
diff --git a/src/app/@core/configs/keycloak.config.ts b/src/app/@core/configs/keycloak.config.ts
index c6ff700..f5e2380 100644
--- a/src/app/@core/configs/keycloak.config.ts
+++ b/src/app/@core/configs/keycloak.config.ts
@@ -1,6 +1,8 @@
import {KeycloakEvent, KeycloakService} from "keycloak-angular";
-import {environment} from '../../../environments/environment';
import Keycloak from "keycloak-js";
+import {Environment} from "../../environment.interface";
+
+declare let config: Environment;
export function initializeKeycloak(keycloak: KeycloakService) {
keycloak.keycloakEvents$.subscribe({
@@ -8,17 +10,17 @@ export function initializeKeycloak(keycloak: KeycloakService) {
keycloak.isLoggedIn().then(loggedIn => {
if (!loggedIn) {
const expirationDate: Date = new Date(0);
- document.cookie = `${environment.cookies.accessToken.name}=; expires=${expirationDate.toUTCString()}; path=/; domain=${environment.cookies.accessToken.domain}; SameSite=Stric`;
- document.cookie = `${environment.cookies.refreshToken.name}=; expires=${expirationDate.toUTCString()}; path=/; domain=${environment.cookies.refreshToken.domain}; SameSite=Stric`;
+ document.cookie = `${config.cookies.accessToken.name}=; expires=${expirationDate.toUTCString()}; path=/; domain=${config.cookies.accessToken.domain}; SameSite=Stric`;
+ document.cookie = `${config.cookies.refreshToken.name}=; expires=${expirationDate.toUTCString()}; path=/; domain=${config.cookies.refreshToken.domain}; SameSite=Stric`;
} else {
const keycloakInstance: Keycloak = keycloak.getKeycloakInstance();
const accessToken: string = keycloakInstance?.token;
if (accessToken && accessToken !== '') {
- document.cookie = `${environment.cookies.accessToken.name}=${accessToken}; expires=Session; path=/; domain=${environment.cookies.accessToken.domain}; SameSite=Strict`;
+ document.cookie = `${config.cookies.accessToken.name}=${accessToken}; expires=Session; path=/; domain=${config.cookies.accessToken.domain}; SameSite=Strict`;
}
const refreshToken: string = keycloakInstance?.refreshToken;
if (refreshToken && refreshToken !== '') {
- document.cookie = `${environment.cookies.refreshToken.name}=${refreshToken}; expires=Session; path=/; domain=${environment.cookies.refreshToken.domain}; SameSite=Strict`;
+ document.cookie = `${config.cookies.refreshToken.name}=${refreshToken}; expires=Session; path=/; domain=${config.cookies.refreshToken.domain}; SameSite=Strict`;
}
}
})
@@ -27,9 +29,9 @@ export function initializeKeycloak(keycloak: KeycloakService) {
return () =>
keycloak.init({
config: {
- url: environment.identity.url,
- realm: environment.identity.realm,
- clientId: environment.identity.clientId,
+ url: config.identity.url,
+ realm: config.identity.realm,
+ clientId: config.identity.clientId,
},
initOptions: {
onLoad: 'check-sso',
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 9228522..d0eb5e2 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,4 +1,7 @@
import {Component} from '@angular/core';
+import {Environment} from "./environment.interface";
+
+declare let __config: Environment;
@Component({
selector: 'app-root',
diff --git a/src/app/environment.interface.ts b/src/app/environment.interface.ts
new file mode 100644
index 0000000..6c03dab
--- /dev/null
+++ b/src/app/environment.interface.ts
@@ -0,0 +1,27 @@
+export interface Environment {
+ identity: {
+ url: string,
+ realm: string,
+ clientId: string,
+ },
+ urls: {
+ identityApi: string,
+ ades: string,
+ resourceCatalogue: string,
+ dataAccess: string,
+ workspace: string,
+ workspaceDocs: string,
+ imagesRegistry: string,
+ dummyService: string,
+ },
+ cookies: {
+ accessToken: {
+ name: string,
+ domain: string
+ },
+ refreshToken: {
+ name: string,
+ domain: string
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/app/features/home/home.component.html b/src/app/features/home/home.component.html
index 9922759..c0a345b 100644
--- a/src/app/features/home/home.component.html
+++ b/src/app/features/home/home.component.html
@@ -5,50 +5,50 @@