From 3f0be1d3581c343abe65a97238309064315200ca Mon Sep 17 00:00:00 2001
From: Doccrazy <Doccrazy@users.noreply.github.com>
Date: Mon, 22 Jan 2018 19:51:14 +0000
Subject: [PATCH] Update README.md

---
 src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
index cbcf1d0..dd08b5b 100644
--- a/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
+++ b/src/main/java/org/keycloak/protocol/cas/CASLoginProtocol.java
@@ -12,7 +12,6 @@
 import org.keycloak.services.managers.ClientSessionCode;
 import org.keycloak.services.managers.ResourceAdminManager;
 import org.keycloak.sessions.AuthenticationSessionModel;
-import org.keycloak.sessions.CommonClientSessionModel;
 
 import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.Response;
@@ -91,9 +90,10 @@
 
         String service = clientSession.getRedirectUri();
         //TODO validate service
-        accessCode.setAction(CommonClientSessionModel.Action.CODE_TO_TOKEN.name());
+
+        String code = accessCode.getOrGenerateCode();
         KeycloakUriBuilder uriBuilder = KeycloakUriBuilder.fromUri(service);
-        uriBuilder.queryParam(TICKET_RESPONSE_PARAM, SERVICE_TICKET_PREFIX + accessCode.getCode());
+        uriBuilder.queryParam(TICKET_RESPONSE_PARAM, SERVICE_TICKET_PREFIX + code);
 
         URI redirectUri = uriBuilder.build();
 

--
Gitblit v1.9.1