From 019db5713e105f989255b99171d4bcf793f7f5ec Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Wed, 06 May 2020 00:19:23 +0000
Subject: [PATCH] Update to Keycloak 8.0.0

---
 src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java                   |    2 +-
 pom.xml                                                                         |    2 +-
 src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java           |    4 ++--
 src/main/java/org/keycloak/protocol/cas/endpoints/AuthorizationEndpoint.java    |    4 ++--
 src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index d73b062..f709adf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
 
     <groupId>org.keycloak</groupId>
     <artifactId>keycloak-protocol-cas</artifactId>
-    <version>7.0.1</version>
+    <version>8.0.0</version>
     <name>Keycloak CAS Protocol</name>
     <description />
 
diff --git a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
index c79ddc8..4557c7a 100644
--- a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
+++ b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
@@ -123,7 +123,7 @@
             sendSingleLogoutRequest(logoutUrl, serviceTicket);
         }
         ClientModel client = clientSession.getClient();
-        new ResourceAdminManager(session).logoutClientSession(uriInfo.getRequestUri(), realm, client, clientSession);
+        new ResourceAdminManager(session).logoutClientSession(realm, client, clientSession);
     }
 
     private void sendSingleLogoutRequest(String logoutUrl, String serviceTicket) {
diff --git a/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java b/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java
index dd6e1b3..d1acb61 100644
--- a/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java
+++ b/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java
@@ -63,7 +63,7 @@
 
         client = realm.getClients().stream()
                 .filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
-                .filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
+                .filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
                 .findFirst().orElse(null);
         if (client == null) {
             event.error(Errors.CLIENT_NOT_FOUND);
diff --git a/src/main/java/org/keycloak/protocol/cas/endpoints/AuthorizationEndpoint.java b/src/main/java/org/keycloak/protocol/cas/endpoints/AuthorizationEndpoint.java
index 865b937..2981732 100644
--- a/src/main/java/org/keycloak/protocol/cas/endpoints/AuthorizationEndpoint.java
+++ b/src/main/java/org/keycloak/protocol/cas/endpoints/AuthorizationEndpoint.java
@@ -64,7 +64,7 @@
 
         client = realm.getClients().stream()
                 .filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
-                .filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
+                .filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
                 .findFirst().orElse(null);
         if (client == null) {
             event.error(Errors.CLIENT_NOT_FOUND);
@@ -76,7 +76,7 @@
             throw new ErrorPageException(session, Response.Status.BAD_REQUEST, Messages.CLIENT_DISABLED);
         }
 
-        redirectUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, client);
+        redirectUri = RedirectUtils.verifyRedirectUri(session, service, client);
 
         event.client(client.getClientId());
         event.detail(Details.REDIRECT_URI, redirectUri);
diff --git a/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java b/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java
index 09a0469..ce2ac6b 100644
--- a/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java
+++ b/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java
@@ -72,10 +72,10 @@
 
         client = realm.getClients().stream()
                 .filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
-                .filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
+                .filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
                 .findFirst().orElse(null);
         if (client != null) {
-            redirectUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, client);
+            redirectUri = RedirectUtils.verifyRedirectUri(session, service, client);
 
             session.getContext().setClient(client);
         }

--
Gitblit v1.9.1