From e42f4eeabbaebbc238b1a3ad00d6b72162f13970 Mon Sep 17 00:00:00 2001 From: Sven-Torben Janus Date: Wed, 15 Jan 2025 20:57:17 +0100 Subject: [PATCH] chore!(deps): Update Keycloak dependencies to 26.1.0 Signed-off-by: Sven-Torben Janus --- .github/ISSUE_TEMPLATE/bug.yml | 2 +- .github/workflows/buildAndTest.yml | 2 +- .github/workflows/matrix.yml | 2 +- README.md | 2 +- docker-compose.yml | 2 +- pom.xml | 2 +- .../keycloak/authentication/hidpd/Redirector.java | 6 ++---- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index c99c525..509da9e 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -38,7 +38,7 @@ body: label: Version description: | examples: - - **Keycloak**: 26.0.7 + - **Keycloak**: 26.1.0 - **This extension**: 26.0.0 value: | - Keycloak: diff --git a/.github/workflows/buildAndTest.yml b/.github/workflows/buildAndTest.yml index bffb28c..12f994c 100644 --- a/.github/workflows/buildAndTest.yml +++ b/.github/workflows/buildAndTest.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - keycloak_version: [ 26.0.0, 26.0.1, 26.0.2, 26.0.4, 26.0.5, 26.0.6, 26.0.7, latest ] + keycloak_version: [ 26.1.0, latest ] experimental: [false] include: - keycloak_version: nightly diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 942ecdb..e7fddd9 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -9,7 +9,7 @@ jobs: strategy: fail-fast: false matrix: - keycloak_version: [ 21.0.2, 21.1.2, 22.0.5, 23.0.7, 24.0.5, 25.0.6, 26.0.0, 26.0.1, 26.0.2, 26.0.4, 26.0.5, 26.0.6, 26.0.7, latest, nightly ] + keycloak_version: [ 21.0.2, 21.1.2, 22.0.5, 23.0.7, 24.0.5, 25.0.6, 26.0.8, 26.1.0, latest, nightly ] extension_version: [ 21.3.0, 22.0.0, 22.1.0, 23.0.0, 24.0.0, 24.1.0, 25.0.1, 26.0.1 ] name: KC ${{ matrix.keycloak_version }}, Extension ${{ matrix.extension_version }} steps: diff --git a/README.md b/README.md index 4436fd6..5ef9007 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ This is a simple Keycloak authenticator to redirect users to their home identity provider during login. ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/sventorben/keycloak-home-idp-discovery?sort=semver) -![Keycloak Dependency Version](https://img.shields.io/badge/Keycloak-26.0.7-blue) +![Keycloak Dependency Version](https://img.shields.io/badge/Keycloak-26.1.0-blue) ![GitHub Release Date](https://img.shields.io/github/release-date-pre/sventorben/keycloak-home-idp-discovery) ![Github Last Commit](https://img.shields.io/github/last-commit/sventorben/keycloak-home-idp-discovery) diff --git a/docker-compose.yml b/docker-compose.yml index b8b7e2b..fba3d51 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ services: keycloak: container_name: keycloak hostname: keycloak - image: quay.io/keycloak/keycloak:26.0.7 + image: quay.io/keycloak/keycloak:26.1.0 environment: KC_BOOTSTRAP_ADMIN_USERNAME: admin diff --git a/pom.xml b/pom.xml index cf8768e..9344249 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 17 - 26.0.7 + 26.1.0 ${version.keycloak} diff --git a/src/main/java/de/sventorben/keycloak/authentication/hidpd/Redirector.java b/src/main/java/de/sventorben/keycloak/authentication/hidpd/Redirector.java index d34a568..c2cad39 100755 --- a/src/main/java/de/sventorben/keycloak/authentication/hidpd/Redirector.java +++ b/src/main/java/de/sventorben/keycloak/authentication/hidpd/Redirector.java @@ -6,7 +6,6 @@ import org.keycloak.authentication.AuthenticationProcessor; import org.keycloak.broker.provider.AuthenticationRequest; import org.keycloak.broker.provider.IdentityProvider; -import org.keycloak.broker.provider.IdentityProviderFactory; import org.keycloak.broker.provider.util.IdentityBrokerState; import org.keycloak.models.IdentityProviderModel; import org.keycloak.models.KeycloakSession; @@ -16,7 +15,7 @@ import org.keycloak.services.managers.ClientSessionCode; import org.keycloak.sessions.AuthenticationSessionModel; -import static org.keycloak.services.resources.IdentityBrokerService.getIdentityProviderFactory; +import static org.keycloak.services.resources.IdentityBrokerService.getIdentityProvider; final class Redirector { @@ -45,8 +44,7 @@ void redirectTo(IdentityProviderModel idp) { return; } new HomeIdpAuthenticationFlowContext(context).loginHint().copyTo(clientSessionCode); - IdentityProviderFactory providerFactory = getIdentityProviderFactory(keycloakSession, idp); - IdentityProvider identityProvider = providerFactory.create(keycloakSession, idp); + IdentityProvider identityProvider = getIdentityProvider(keycloakSession, idp.getAlias()); Response response = identityProvider.performLogin(createAuthenticationRequest(providerAlias, identityProvider, clientSessionCode)); context.forceChallenge(response);