Documentation

Integration examples

We will describe the multiple steps to create a SharingFlow and fetch the shared user info from our back end. All the requests are in our Postman template (the link below)

These integration examples are meant to let you understand the way everything works, in order to properly integrate MiTrust in your front and back end.

Mitrust Postman Examples

Start SharingFlow

Launch the Start SharingFlow request
with your parameters (client_id, redirect_uri, scope, state, response_type)
Follow the redirection given by the header.location

By following the redirection, you will arrived on the first page of datasharing process

Steps of the datasharing process:

  1. Start the SharingFlow by clicking on the CTA.(If the welcome page is enabled)
  2. Choose DataProvider Always OK: (No credentials required, we are using credentials for the purpose of this test)
    Username: Test
    Password: Test
  3. Select and share a Profile by clicking the CTA

Convert authorization_code

In the previous step, you should have completed the sharing part, and have been redirected on an url thats look like this:

https://www.example.com/redirect_from_mitrust?code=1MB2F5&state=postman-sbx_MiTrust_Integration_Tutorial.en

From this URL, take YOUR code ( ours is 1MB2F5 ) and use it in the POST body of the Convert authorization_code postman request.
This request should be made with an 'Authorization': 'Basic' + Base64(client_id:secret_key) The response will contain an access_token.

Get user_info

Now that you have your access_token.
Use it in the Get user_info postman request .
This request should be made with an 'Authorization': 'Bearer' + access_token

The response will contain the user info you just shared in the data sharing.

In case of an autoupdate flow, the response received will also contain an autoupdate token


What’s Next