Fix for "updatedAt" user attribute in "profile" client scope should use number instead of String (#11020)
Closes #10081 Co-authored-by: Indrajit Ingawale <iingawal@iingawal.pnq.csb>
This commit is contained in:
parent
aacae9b9ac
commit
6016b461db
2 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,7 @@ public class OIDCLoginProtocolFactory extends AbstractLoginProtocolFactory {
|
|||
createUserAttributeMapper(GENDER, "gender", IDToken.GENDER, "String");
|
||||
createUserAttributeMapper(BIRTHDATE, "birthdate", IDToken.BIRTHDATE, "String");
|
||||
createUserAttributeMapper(ZONEINFO, "zoneinfo", IDToken.ZONEINFO, "String");
|
||||
createUserAttributeMapper(UPDATED_AT, "updatedAt", IDToken.UPDATED_AT, "String");
|
||||
createUserAttributeMapper(UPDATED_AT, "updatedAt", IDToken.UPDATED_AT, "long");
|
||||
createUserAttributeMapper(LOCALE, "locale", IDToken.LOCALE, "String");
|
||||
|
||||
createUserAttributeMapper(PHONE_NUMBER, "phoneNumber", IDToken.PHONE_NUMBER, "String");
|
||||
|
|
|
@ -91,6 +91,7 @@ public class OIDCScopeTest extends AbstractOIDCScopeTest {
|
|||
attrs.add("street", "Elm 5");
|
||||
attrs.add("phoneNumber", "111-222-333");
|
||||
attrs.add("phoneNumberVerified", "true");
|
||||
attrs.add("updatedAt", "1643282255");
|
||||
user.setAttributes(attrs);
|
||||
|
||||
testRealm.getUsers().add(user);
|
||||
|
@ -218,6 +219,7 @@ public class OIDCScopeTest extends AbstractOIDCScopeTest {
|
|||
Assert.assertEquals("John", idToken.getGivenName());
|
||||
Assert.assertEquals("Doe", idToken.getFamilyName());
|
||||
Assert.assertEquals("John Doe", idToken.getName());
|
||||
Assert.assertEquals(new Long(1643282255L),idToken.getUpdatedAt());
|
||||
} else {
|
||||
Assert.assertNull(idToken.getPreferredUsername());
|
||||
Assert.assertNull(idToken.getGivenName());
|
||||
|
|
Loading…
Reference in a new issue