In my Auth Provider RegistrationHandler, I received an instance of the Auth.UserData class, filled with users data (in this case it is an external Salesforce user). The usage is very comfortable, as long as you use the top-level attributes, or have primitive data types for every of the attributeMap. The attributeMap is a Map-String,String-, so it is easy to do something like:
DateTime cDate = DateTime.valueOf(data.attributeMap.get('created_date'));
The problem is when you have another Map as a value for the attributeMap, which will be converted by Salesforce into a single string:
--> "photos":"{picture=https://c.na24.content.force.com/profilephoto/005/F, thumbnail=https://c.na24.content.force.com/profilephoto/005/T}"
Salesforce describes this format as "a common format":
If the registration handler wants to use the rest of the data, the Auth.UserData class has an attributeMap variable. The attribute map is a map of strings (Map-String, String-) for the raw values of all the data from the third party. Because the map is -String, String-, values that the third party returns that are not strings (like an array of URLs or a map) are converted into an appropriate string representation. The map includes everything returned by the third-party authorization provider, including the items automatically converted into the common format.
My question is, has anyone ever parsed Maps from this common format?