From b43f63997028b7aeefd5c58e6132f40dc5a7dfe4 Mon Sep 17 00:00:00 2001 From: Denis Sinelnikov Date: Tue, 23 Jan 2024 16:43:54 +0400 Subject: [PATCH] CB-4389. Fix logout redirect and npe for logout parameter --- .../cloudbeaver/service/auth/impl/WebServiceAuthImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java index a8367e940e..f590be3c38 100644 --- a/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java +++ b/server/bundles/io.cloudbeaver.service.auth/src/io/cloudbeaver/service/auth/impl/WebServiceAuthImpl.java @@ -149,7 +149,7 @@ public WebLogoutInfo authLogout( var cbApp = CBApplication.getInstance(); for (WebAuthInfo removedInfo : removedInfos) { if (removedInfo.getAuthProviderDescriptor() - .getInstance() instanceof SMSignOutLinkProvider federatedProvider + .getInstance() instanceof SMSignOutLinkProvider provider && removedInfo.getAuthSession() != null ) { var providerConfig = @@ -160,10 +160,10 @@ public WebLogoutInfo authLogout( } String logoutUrl; if (removedInfo.getAuthSession() instanceof SMSessionExternal externalSession) { - logoutUrl = federatedProvider.getUserSignOutLink(providerConfig, + logoutUrl = provider.getUserSignOutLink(providerConfig, externalSession.getAuthParameters()); } else { - logoutUrl = federatedProvider.getUserSignOutLink(providerConfig, + logoutUrl = provider.getUserSignOutLink(providerConfig, Map.of()); } if (CommonUtils.isNotEmpty(logoutUrl)) {