From 3903ac4e5f180b3f0089c7720713274b53a11cd5 Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Fri, 6 Mar 2020 14:13:22 -0700 Subject: [PATCH] Document baseUrl Support for OIDC Logout Fixes gh-8072 --- .../asciidoc/_includes/servlet/oauth2/oauth2-login.adoc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc b/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc index dd4d115e94..45902711b8 100644 --- a/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc +++ b/docs/manual/src/docs/asciidoc/_includes/servlet/oauth2/oauth2-login.adoc @@ -1307,11 +1307,14 @@ public class OAuth2LoginSecurityConfig extends WebSecurityConfigurerAdapter { OidcClientInitiatedLogoutSuccessHandler oidcLogoutSuccessHandler = new OidcClientInitiatedLogoutSuccessHandler(this.clientRegistrationRepository); - // Sets the `URI` that the End-User's User Agent will be redirected to + // Sets the location that the End-User's User Agent will be redirected to // after the logout has been performed at the Provider - oidcLogoutSuccessHandler.setPostLogoutRedirectUri(URI.create("https://localhost:8080")); + oidcLogoutSuccessHandler.setPostLogoutRedirectUri("{baseUrl}"); return oidcLogoutSuccessHandler; } } + +NOTE: `OidcClientInitiatedLogoutSuccessHandler` supports the `{baseUrl}` placeholder. +If used, the application's base URL, like `https://app.example.org`, will replace it at request time. ----