Commit 92ea6b15 authored by Jacek Kowalski's avatar Jacek Kowalski

Update to Keycloak 8.0.0

Change redirect/logout methods to match changes in Keycloack
parent 8aa9b909
......@@ -13,7 +13,7 @@ services:
- docker
env:
- KEYCLOAK_VERSION=7.0.0
- KEYCLOAK_VERSION=8.0.0
before_install:
- if [ "$TRAVIS_EVENT_TYPE" != "cron" ]; then docker pull quay.io/keycloak/keycloak:$KEYCLOAK_VERSION; fi
......
......@@ -22,7 +22,7 @@
<groupId>org.keycloak</groupId>
<artifactId>keycloak-protocol-cas</artifactId>
<version>7.0.0</version>
<version>8.0.0</version>
<name>Keycloak CAS Protocol</name>
<description />
......
......@@ -123,7 +123,7 @@ public class CASLoginProtocol implements LoginProtocol {
sendSingleLogoutRequest(logoutUrl, serviceTicket);
}
ClientModel client = clientSession.getClient();
new ResourceAdminManager(session).logoutClientSession(uriInfo.getRequestUri(), realm, client, clientSession);
new ResourceAdminManager(session).logoutClientSession(realm, client, clientSession);
}
private void sendSingleLogoutRequest(String logoutUrl, String serviceTicket) {
......
......@@ -63,7 +63,7 @@ public abstract class AbstractValidateEndpoint {
client = realm.getClients().stream()
.filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
.filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
.filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
.findFirst().orElse(null);
if (client == null) {
event.error(Errors.CLIENT_NOT_FOUND);
......
......@@ -64,7 +64,7 @@ public class AuthorizationEndpoint extends AuthorizationEndpointBase {
client = realm.getClients().stream()
.filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
.filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
.filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
.findFirst().orElse(null);
if (client == null) {
event.error(Errors.CLIENT_NOT_FOUND);
......@@ -76,7 +76,7 @@ public class AuthorizationEndpoint extends AuthorizationEndpointBase {
throw new ErrorPageException(session, Response.Status.BAD_REQUEST, Messages.CLIENT_DISABLED);
}
redirectUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, client);
redirectUri = RedirectUtils.verifyRedirectUri(session, service, client);
event.client(client.getClientId());
event.detail(Details.REDIRECT_URI, redirectUri);
......
......@@ -72,10 +72,10 @@ public class LogoutEndpoint {
client = realm.getClients().stream()
.filter(c -> CASLoginProtocol.LOGIN_PROTOCOL.equals(c.getProtocol()))
.filter(c -> RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, c) != null)
.filter(c -> RedirectUtils.verifyRedirectUri(session, service, c) != null)
.findFirst().orElse(null);
if (client != null) {
redirectUri = RedirectUtils.verifyRedirectUri(session.getContext().getUri(), service, realm, client);
redirectUri = RedirectUtils.verifyRedirectUri(session, service, client);
session.getContext().setClient(client);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment