From 46a6c57405b58524e4154e8ec1e04db0bf3f7416 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Jun 2023 10:58:45 +0000 Subject: [PATCH] Update to Keycloak 21.1.2 --- src/main/java/org/keycloak/protocol/cas/CASLoginProtocolService.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocolService.java b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocolService.java index 80e5c28..041303e 100644 --- a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocolService.java +++ b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocolService.java @@ -12,11 +12,9 @@ import javax.ws.rs.core.*; public class CASLoginProtocolService { + private KeycloakSession session; private RealmModel realm; private EventBuilder event; - - @Context - private KeycloakSession session; @Context private HttpHeaders headers; @@ -24,8 +22,9 @@ @Context private HttpRequest request; - public CASLoginProtocolService(RealmModel realm, EventBuilder event) { - this.realm = realm; + public CASLoginProtocolService(KeycloakSession session, EventBuilder event) { + this.session = session; + this.realm = session.getContext().getRealm(); this.event = event; } @@ -35,14 +34,14 @@ @Path("login") public Object login() { - AuthorizationEndpoint endpoint = new AuthorizationEndpoint(realm, event); + AuthorizationEndpoint endpoint = new AuthorizationEndpoint(session, event); ResteasyProviderFactory.getInstance().injectProperties(endpoint); return endpoint; } @Path("logout") public Object logout() { - LogoutEndpoint endpoint = new LogoutEndpoint(realm, event); + LogoutEndpoint endpoint = new LogoutEndpoint(realm); ResteasyProviderFactory.getInstance().injectProperties(endpoint); return endpoint; } -- Gitblit v1.9.1