From d9e03b769bdb9dc1caafa988c9416c75c01a0438 Mon Sep 17 00:00:00 2001 From: Justin Richer Date: Tue, 26 May 2015 20:19:13 -0400 Subject: [PATCH] fixed auth holder reference handling, import/export works now --- .../connect/service/impl/MITREidDataService_1_2.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataService_1_2.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataService_1_2.java index fb4e44679..e8b25e949 100644 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataService_1_2.java +++ b/openid-connect-server/src/main/java/org/mitre/openid/connect/service/impl/MITREidDataService_1_2.java @@ -265,7 +265,7 @@ public class MITREidDataService_1_2 extends MITREidDataServiceSupport implements writer.beginObject(); writer.name("name").value(holder.getUserAuth().getName()); writer.name("sourceClass").value(holder.getUserAuth().getSourceClass()); - + writer.name("authenticated").value(holder.getUserAuth().isAuthenticated()); writer.name("authorities"); writer.beginArray(); for (GrantedAuthority authority : holder.getUserAuth().getAuthorities()) { @@ -682,8 +682,7 @@ public class MITREidDataService_1_2 extends MITREidDataServiceSupport implements if (reader.peek() == JsonToken.NULL) { reader.skipValue(); } else if (name.equals("id")) { - ahe.setId(reader.nextLong()); - currentId = ahe.getId(); + currentId = reader.nextLong(); } else if (name.equals("requestParameters")) { ahe.setRequestParameters(readMap(reader)); } else if (name.equals("clientId")) { @@ -751,6 +750,8 @@ public class MITREidDataService_1_2 extends MITREidDataServiceSupport implements savedUserAuth.setName(reader.nextString()); } else if (name.equals("sourceClass")) { savedUserAuth.setSourceClass(reader.nextString()); + } else if (name.equals("authenticated")) { + savedUserAuth.setAuthenticated(reader.nextBoolean()); } else if (name.equals("authorities")) { Set authorityStrs = readSet(reader); Set authorities = new HashSet();