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

github-actions
2024-01-09 4e3effb47cfd3c2b07a98df57e773cf3a991fd8d
src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
@@ -1,5 +1,8 @@
package org.keycloak.protocol.cas;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.core.Response;
import jakarta.ws.rs.core.UriInfo;
import org.apache.http.HttpEntity;
import org.jboss.logging.Logger;
import org.keycloak.common.util.KeycloakUriBuilder;
@@ -17,9 +20,6 @@
import org.keycloak.services.managers.ResourceAdminManager;
import org.keycloak.sessions.AuthenticationSessionModel;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.io.IOException;
import java.net.URI;
import java.util.UUID;
@@ -100,7 +100,8 @@
        OAuth2Code codeData = new OAuth2Code(UUID.randomUUID().toString(),
                Time.currentTime() + userSession.getRealm().getAccessCodeLifespan(),
                null, null, authSession.getRedirectUri(), null, null);
                null, null, authSession.getRedirectUri(), null, null,
                userSession.getId());
        String code = OAuth2CodeParser.persistCode(session, clientSession, codeData);
        KeycloakUriBuilder uriBuilder = KeycloakUriBuilder.fromUri(service);
@@ -139,7 +140,7 @@
            sendSingleLogoutRequest(logoutUrl, serviceTicket);
        }
        ClientModel client = clientSession.getClient();
        new ResourceAdminManager(session).logoutClientSession(realm, client, clientSession);
        new ResourceAdminManager(session).logoutClientSession(realm, client, clientSession).close();
        return Response.ok().build();
    }