From 3d2d8493ea54a6fc554c8f23b6f9f56093b33c79 Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Fri, 17 Nov 2023 14:38:31 +0100 Subject: [PATCH] Prevent 404 when stopping impersonation --- client/src/components/Impersonating.js | 2 +- server/src/main/java/access/SwaggerOpenIdConfig.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/components/Impersonating.js b/client/src/components/Impersonating.js index 3bf1deb9..8155b1a0 100644 --- a/client/src/components/Impersonating.js +++ b/client/src/components/Impersonating.js @@ -33,7 +33,7 @@ export const Impersonating = () => { onClick={() => { stopImpersonation(); setFlash(I18n.t("impersonate.flash.clearedImpersonation")); - navigate("/home"); + navigate("/"); }} txt={I18n.t("impersonate.exit")}/> diff --git a/server/src/main/java/access/SwaggerOpenIdConfig.java b/server/src/main/java/access/SwaggerOpenIdConfig.java index 874ffdaa..490f3c09 100644 --- a/server/src/main/java/access/SwaggerOpenIdConfig.java +++ b/server/src/main/java/access/SwaggerOpenIdConfig.java @@ -53,8 +53,12 @@ OpenAPI customOpenApi(@Value("${spring.security.oauth2.client.provider.oidcng.au .addSecuritySchemes(ATTRIBUTE_AGGREGATION_SCHEME_NAME, basicAuthentication); OpenAPI openAPI = new OpenAPI() - .info(new Info().description("Access app API endpoints").title("Access app API")) - .addServersItem(new Server().url(baseUrl)); + .info(new Info() + .description("Invite external API endpoints") + .title("Invite API") + .version("v1")) + .addServersItem(new Server() + .url(baseUrl)); openAPI.components(components) .addSecurityItem(new SecurityRequirement().addList(OPEN_ID_SCHEME_NAME));