User Info response format
The /userinfo response is produced in a single call, and is formatted in JSON. Its data is split up in several keys.
user_infokey
user_infokeyThe user_info is where the User Data is serialized. It follows a hierarchical format, so that if a claim such as postal_address.formatted is in scope, then the corresponding datapoint will be under user_info > postal_address > formatted path.
The
user_infopart may contain any valid JSON data, including arrays, numbers, booleans.Date or time-based formats will be formatted as ISO-8601 (respective of the data's precision), countries as ISO 3166-alpha3 codes, currencies as ISO 4217 codes, unless some specific reason applies (e.g. source-specific behavior).
post_processed key
post_processed keyWhen the Sharing Flow's scope includes normalizing instructions (for example, address#normalized), the normalized data points will be published inside the post_processed key, next to user_info. The post_processed structure is similar to the user_info structure, with hierarchical nesting of data points.
user_consent key
user_consent keyThe user_consent key holds an encrypted token that only MiTrust can decrypt, and can be used for non-repudiation purposes.
autoupdate key
autoupdate keyWhen the AutoUpdate feature is activated, the related data points will be rendered inside this key. Most notably, this will be the place where the AutoUpdate Token can be read, alongside its expiration date.
Document format
Some scope may be associated to a binary document. For instance, the claim postal_address may have a sub-claim proof_of_residence. In such a case, the document is provided in the following format:
{
"user_consent": {
"jwe": "encryptedUserConsent"
},
"user_info": {
"postal_address": {
"formatted": "John DOE 3 rue Bellini 92800 Puteaux",
"proof_of_residence": {
"file_wrapper": {
"base64": "BINARY_DATA_IN_BASE64_ENCODING",
"filename": "proof_of_residence.pdf"
}
}
}
}
} certificate key
certificate keyService Providers that are using the MiTrust certificate will find it alongside the user_info, under the certificate key. The MiTrust certificate is a signed PDF document, that will be serialized as other documents (see above). It will hold the Sharing Data, (user_info and post_processed) as well as technical details of the transaction.
Full response format
The full-response will look like:
{
"data": {
"links": [
{
"href": "https://sbx-app.m-itrust.com/user_data/v1/userinfo",
"rel": "self"
}
],
"user_consent": {
"jwe": "encryptedConsent",
"links": [
{
"href": "https://sbx-app.m-itrust.com/service_provider/v1/userconsent",
"rel": "self"
}
]
},
"user_info": {
"address": {
"country": "FR",
"formatted": "3 RUE BELLINI 92800 PUTEAUX Complément d'adresse : 3EG",
"locality": "",
"postal_code": "92800",
"region": "",
"street_address": ""
},
"email": "[email protected]",
"family_name": "DOE",
"gender": "Mr",
"given_name": "JOHN",
"name": "DOE JOHN",
"phone_number": "0123456789",
"postal_address": {
"formatted": "John DOE 3 rue Bellini 92800 Puteaux",
"proof_of_residence": {
"file_wrapper": {
"base64": "BINARY_DATA_IN_BASE64_ENCODING",
"filename": "RE1_01_6456455601_6146559528.pdf"
}
}
}
},
"autoupdate": {
"access_token_wrapper": {
"token_type": "headless",
"access_token": "eyJhbGci... suite du l'autoupdate token (JWT)",
"expires_in": 3599,
"links": [
{
"rel": "self",
"href": "https://sbx-app.m-itrust.com/v2/sp/headless"
}
]
}
},
"certificate": {
"file_wrapper": {
"filename": "mitrust_certificate.pdf",
"base64": "JVBERi0xLjYKJfb... suite du certificat (PDF en base64)"
}
}
},
"message": "Here are some data about user: 44c87444-b642-4d10-9c39-c97dcf53e5e9",
"status": "succes"
} Updated 5 days ago
