diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 201596b8..11fb4012 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -36,10 +36,7 @@ import {RouterLink, RouterView} from "vue-router";
@@ -65,7 +73,7 @@ import {RouterLink, RouterView} from "vue-router";
#app {
max-width: 1280px;
- margin: 0px auto 0px 16rem;
+ margin: 0 auto 0 16rem;
padding: 2rem;
font-weight: normal;
@@ -167,7 +175,8 @@ import ManageIcon from "@/assets/icons/manage.svg";
import CatalogIcon from "@/assets/icons/catalog.svg";
import ResponsesIcon from "@/assets/icons/responses.svg";
import StockIcon from "@/assets/icons/stock.svg";
-
+import TrashIcon from "@/assets/icons/trash.svg";
+import AuthenticationService from "@/services/AuthenticationService";
export default {
name: "StockView",
@@ -196,6 +205,9 @@ export default {
};
return imageMap[routeName.toLowerCase()];
},
+ logout() {
+ AuthenticationService.logout();
+ },
},
};
diff --git a/frontend/src/main.js b/frontend/src/main.js
index 01ffac75..c61c4207 100644
--- a/frontend/src/main.js
+++ b/frontend/src/main.js
@@ -28,8 +28,7 @@ import Config from "./config.json";
import AuthenticationService from "./services/AuthenticationService.js";
-AuthenticationService
- .init()
+AuthenticationService.init()
.then(() => {
console.info("User is authenticated, init application");
@@ -39,7 +38,9 @@ AuthenticationService
app.use(router);
app.use(JsonViewer);
- console.debug("config.json BACKEND_BASE_URL=" + Config.BACKEND_BASE_URL);
+ console.debug(
+ "config.json BACKEND_BASE_URL=" + Config.BACKEND_BASE_URL
+ );
console.debug(".env.x VITE_BASE_URL=" + import.meta.env.VITE_BASE_URL);
app.mount("#app");
@@ -48,5 +49,3 @@ AuthenticationService
.catch((error) => {
console.log(error);
});
-
-window.authService = AuthenticationService;
diff --git a/frontend/src/services/AuthenticationService.js b/frontend/src/services/AuthenticationService.js
index 4698c3e7..b854dae4 100644
--- a/frontend/src/services/AuthenticationService.js
+++ b/frontend/src/services/AuthenticationService.js
@@ -78,6 +78,9 @@ const userHasRole = (requiredRoles) => {
};
const logout = () => {
+ if (!isEnabled){
+ return;
+ }
keycloak
.logout()
.then((success) => {
diff --git a/local/keycloak/puris-config/Catena-X-realm.json b/local/keycloak/puris-config/Catena-X-realm.json
index e72076bf..d4ac184a 100644
--- a/local/keycloak/puris-config/Catena-X-realm.json
+++ b/local/keycloak/puris-config/Catena-X-realm.json
@@ -427,7 +427,7 @@
"protocol" : "openid-connect",
"attributes" : {
"client.secret.creation.time" : "1701016951",
- "post.logout.redirect.uris" : "http://localhost:10081",
+ "post.logout.redirect.uris" : "",
"oauth2.device.authorization.grant.enabled" : "false",
"backchannel.logout.revoke.offline.tokens" : "false",
"use.refresh.tokens" : "true",