From 8c2e7567328a698515368759b652568c6ba824e0 Mon Sep 17 00:00:00 2001 From: Bill Burke Date: Sat, 25 Mar 2017 19:21:50 -0400 Subject: [PATCH] fix --- .../org/keycloak/services/resources/IdentityBrokerService.java | 2 +- .../testsuite/broker/AbstractKeycloakIdentityProviderTest.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java index 503b75b64d..f9efe19ab6 100755 --- a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java +++ b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java @@ -861,7 +861,7 @@ public class IdentityBrokerService implements IdentityProvider.AuthenticationCal .detail(Details.IDENTITY_PROVIDER, newModel.getIdentityProvider()) .detail(Details.IDENTITY_PROVIDER_USERNAME, newModel.getUserName()) .success(); - + // we do this to make sure that the parent IDP is logged out when this user session is complete. clientSession.getUserSession().setNote(Details.IDENTITY_PROVIDER, context.getIdpConfig().getAlias()); diff --git a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/AbstractKeycloakIdentityProviderTest.java b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/AbstractKeycloakIdentityProviderTest.java index 0977d2dbc6..b047595f5d 100755 --- a/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/AbstractKeycloakIdentityProviderTest.java +++ b/testsuite/integration/src/test/java/org/keycloak/testsuite/broker/AbstractKeycloakIdentityProviderTest.java @@ -433,6 +433,7 @@ public abstract class AbstractKeycloakIdentityProviderTest extends AbstractIdent // Assert I am logged immediately to account management due to previously linked "test-user" identity loginPage.clickSocial(identityProviderModel.getAlias()); + this.loginPage.login("test-user", "password"); doAfterProviderAuthentication(); assertTrue(accountFederatedIdentityPage.isCurrent()); assertTrue(driver.getPageSource().contains("id=\"remove-" + identityProviderModel.getAlias() + "\""));