From be24027c26ecec030395d389b0ee818e5bc1ec34 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 13 Jan 2023 10:16:19 +0000 Subject: [PATCH] Update to Keycloak 20.0.3 --- src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) 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 1db8322..aaaa45d 100644 --- a/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java +++ b/src/main/java/org/keycloak/protocol/cas/endpoints/LogoutEndpoint.java @@ -20,7 +20,6 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.Response; -import javax.ws.rs.core.UriInfo; public class LogoutEndpoint { private static final Logger logger = Logger.getLogger(LogoutEndpoint.class); @@ -36,9 +35,6 @@ @Context private HttpHeaders headers; - - @Context - private UriInfo uriInfo; private RealmModel realm; private EventBuilder event; @@ -62,7 +58,7 @@ if (redirectUri != null) userSession.setNote(CASLoginProtocol.LOGOUT_REDIRECT_URI, redirectUri); logger.debug("Initiating CAS browser logout"); - Response response = AuthenticationManager.browserLogout(session, realm, authResult.getSession(), uriInfo, clientConnection, headers); + Response response = AuthenticationManager.browserLogout(session, realm, authResult.getSession(), session.getContext().getUri(), clientConnection, headers); logger.debug("finishing CAS browser logout"); return response; } @@ -74,12 +70,12 @@ return; } - client = realm.getClients().stream() + client = realm.getClientsStream() .filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol())) - .filter(c -> RedirectUtils.verifyRedirectUri(uriInfo, service, realm, c) != null) + .filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null) .findFirst().orElse(null); if (client != null) { - redirectUri = RedirectUtils.verifyRedirectUri(uriInfo, service, realm, client); + redirectUri = RedirectUtils.verifyRedirectUri(session, service, client); session.getContext().setClient(client); } -- Gitblit v1.9.1