From c4bfdac0908285415a8cb03cb03634f6be923ca2 Mon Sep 17 00:00:00 2001
From: Updater Bot <updater@travis-ci.org>
Date: Wed, 05 Dec 2018 18:28:25 +0000
Subject: [PATCH] Update to Keycloak 4.7.0.Final

---
 src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
index a1afb9d..fecd557 100644
--- a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
+++ b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
@@ -25,6 +25,7 @@
     public static final String LOGIN_PROTOCOL = "cas";
 
     public static final String SERVICE_PARAM = "service";
+    public static final String TARGET_PARAM = "TARGET";
     public static final String RENEW_PARAM = "renew";
     public static final String GATEWAY_PARAM = "gateway";
     public static final String TICKET_PARAM = "ticket";
@@ -141,13 +142,14 @@
 
         event.event(EventType.LOGOUT);
         event.user(userSession.getUser()).session(userSession).success();
-        LoginFormsProvider infoPage = session.getProvider(LoginFormsProvider.class).setSuccess("Logout successful");
+
         if (redirectUri != null) {
-            infoPage.setAttribute("pageRedirectUri", redirectUri);
+            return Response.status(302).location(URI.create(redirectUri)).build();
         } else {
+            LoginFormsProvider infoPage = session.getProvider(LoginFormsProvider.class).setSuccess("Logout successful");
             infoPage.setAttribute("skipLink", true);
+            return infoPage.createInfoPage();
         }
-        return infoPage.createInfoPage();
     }
 
     @Override

--
Gitblit v1.9.1