KEYCLOAK-14577 OIDCIdentityProvider incorrectly sets firstName and lastName in BrokeredIdentityContext

This commit is contained in:
Torsten Roemer 2021-02-18 12:38:25 +01:00 committed by Marek Posolda
parent 00ee6bb9fa
commit 750f5fdb0a

View file

@ -224,8 +224,8 @@ public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest
createUserAndResetPasswordWithAdminClient(realm, user, "password"); createUserAndResetPasswordWithAdminClient(realm, user, "password");
user = new UserRepresentation(); user = new UserRepresentation();
user.setUsername(PARENT3_USERNAME); user.setUsername(PARENT3_USERNAME);
user.setFirstName("firstname"); user.setFirstName("first name");
user.setLastName("lastname"); user.setLastName("last name");
user.setEmail("email"); user.setEmail("email");
user.setEnabled(true); user.setEnabled(true);
createUserAndResetPasswordWithAdminClient(realm, user, "password"); createUserAndResetPasswordWithAdminClient(realm, user, "password");
@ -746,8 +746,8 @@ public class BrokerLinkAndTokenExchangeTest extends AbstractServletsAdapterTest
Assert.assertNotNull(token); Assert.assertNotNull(token);
Assert.assertNotNull(token.getSubject()); Assert.assertNotNull(token.getSubject());
Assert.assertEquals(PARENT3_USERNAME, token.getPreferredUsername()); Assert.assertEquals(PARENT3_USERNAME, token.getPreferredUsername());
Assert.assertEquals("firstname", token.getGivenName()); Assert.assertEquals("first name", token.getGivenName());
Assert.assertEquals("lastname", token.getFamilyName()); Assert.assertEquals("last name", token.getFamilyName());
Assert.assertEquals("email", token.getEmail()); Assert.assertEquals("email", token.getEmail());
// cleanup remove the user // cleanup remove the user