From 83d7627ed021940fe2cee565cfe43857f5f2f606 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Sun, 24 Jul 2016 16:49:46 -0400 Subject: [PATCH] serialize phone_number and phone_number_verified, closes #1030 --- .../java/org/mitre/openid/connect/model/DefaultUserInfo.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openid-connect-common/src/main/java/org/mitre/openid/connect/model/DefaultUserInfo.java b/openid-connect-common/src/main/java/org/mitre/openid/connect/model/DefaultUserInfo.java index 8e9900cae..1bc96e95a 100644 --- a/openid-connect-common/src/main/java/org/mitre/openid/connect/model/DefaultUserInfo.java +++ b/openid-connect-common/src/main/java/org/mitre/openid/connect/model/DefaultUserInfo.java @@ -497,6 +497,9 @@ public class DefaultUserInfo implements UserInfo { ui.setEmail(nullSafeGetString(obj, "email")); ui.setEmailVerified(obj.has("email_verified") && obj.get("email_verified").isJsonPrimitive() ? obj.get("email_verified").getAsBoolean() : null); + ui.setPhoneNumber(nullSafeGetString(obj, "phone_number")); + ui.setPhoneNumberVerified(obj.has("phone_number_verified") && obj.get("phone_number_verified").isJsonPrimitive() ? obj.get("phone_number_verified").getAsBoolean() : null); + if (obj.has("address") && obj.get("address").isJsonObject()) { JsonObject addr = obj.get("address").getAsJsonObject(); ui.setAddress(new DefaultAddress());