diff --git a/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/ApplicationConfig.java b/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/ApplicationConfig.java index 8c3c09e19..59ef148e7 100644 --- a/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/ApplicationConfig.java +++ b/oauth2/playground2/src/main/org/wso2/sample/identity/oauth2/ApplicationConfig.java @@ -41,6 +41,7 @@ public class ApplicationConfig { public static final String LOGOUT_ENDPOINT_CONTEXT = "LogoutEndpointContext"; public static final String USER_INFO_ENDPOINT_CONTEXT = "UserInfoEndpointContext"; public static final String SESSION_IFRAME_ENDPOINT_CONTEXT = "SessionIFrameEndpointContext"; + public static final String POST_LOGOUT_REDIRECT_URI = "PostLogoutRedirectUri"; private static Properties properties = new Properties(); @@ -138,6 +139,15 @@ public static int getISPort() { return value; } + public static String getPostLogoutRedirectUri() { + + String postLogoutRedirectUri = getProperties().getProperty(POST_LOGOUT_REDIRECT_URI); + if (StringUtils.isBlank(postLogoutRedirectUri)) { + postLogoutRedirectUri = StringUtils.EMPTY; + } + return postLogoutRedirectUri; + } + private static String buildURL(String context) { String buildURL = ""; if (StringUtils.isNotEmpty(context)) { diff --git a/oauth2/playground2/src/main/resources/playground2.properties b/oauth2/playground2/src/main/resources/playground2.properties index 31bb4cd01..b279a8e90 100644 --- a/oauth2/playground2/src/main/resources/playground2.properties +++ b/oauth2/playground2/src/main/resources/playground2.properties @@ -5,7 +5,7 @@ ConsumerSecret= Scope=openid #Callback URL endpoint that is configured in Identity Server for this OAuth2 application. CallbackURL=http://localhost:8080/playground2/oauth2client - +PostLogoutRedirectUri=http://localhost:8080/playground2/oauth2client #Identity Server endpoint details. IdentityServerHostName=localhost IdentityServerPort=9443 diff --git a/oauth2/playground2/src/main/webapp/oauth2.jsp b/oauth2/playground2/src/main/webapp/oauth2.jsp index c568cf48c..cf9639b96 100644 --- a/oauth2/playground2/src/main/webapp/oauth2.jsp +++ b/oauth2/playground2/src/main/webapp/oauth2.jsp @@ -687,10 +687,21 @@