mirror of https://github.com/jacekkow/keycloak-protocol-cas

github-actions
2023-07-12 cb8984ba66d2de8352fb1ff08fc3d23d04c3dba7
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;
    }