Merge pull request #3192 from mposolda/master

KEYCLOAK-2957 IdpEmailVerificationAuthenticator should setEmailVerifi…
This commit is contained in:
Marek Posolda 2016-09-05 23:03:03 +02:00 committed by GitHub
commit db0f05fb86
2 changed files with 7 additions and 0 deletions

View file

@ -132,6 +132,9 @@ public class IdpEmailVerificationAuthenticator extends AbstractIdpAuthenticator
clientSession.setNote(IS_DIFFERENT_BROWSER, "true");
}
// User successfully confirmed linking by email verification. His email was defacto verified
existingUser.setEmailVerified(true);
context.setUser(existingUser);
context.success();
} else {

View file

@ -287,6 +287,10 @@ public abstract class AbstractFirstBrokerLoginTest extends AbstractIdentityProvi
// authenticated and redirected to app. User is linked with identity provider
assertFederatedUser("pedroigor", "psilva@redhat.com", "pedroigor");
// Assert user's email is verified now
UserModel user = getFederatedUser();
Assert.assertTrue(user.isEmailVerified());
}