Map<String, Object> attributes = new HashMap<String, Object>();
Map<String, String> publicAttributes = tokenInfo.getPublicAttributes();
for (String attrName : publicAttributes.keySet()) {
attributes.put(attrName, publicAttributes.get(attrName));
}
return new AuthInfoImpl(tokenInfo.getUserId(), attributes, principals);
} else {
return null;
}
}