Smile CDR v2024.05.PRE
On this page:

16.17.1SMART User Profile Information


The SMART on FHIR specification recommends that SMART applications request the scopes openid fhirUser in addition to scopes describing the specific FHIR data access requirements for the application.

When the openid and fhirUser scopes are approved, the authorization response to the Application will include a special token called an ID Token. This is provided in addition to the Access Token as a part of the same response object.

The ID Token is a Signed JWT that can be decoded to reveal a payload similar to the following example:


By default, the profile link will contain an automatically generated reference to a RelatedPerson resource containing the known demographics of the logged in user.

If you are setting up an infrastructure using the SMART Outbound Security module as your Authorization Server, where a FHIR repository is accessible to the Application being authorized, and that repository contains a real resource corresponding to the user (for example, a Patient or Practitioner resource) you can insert an appropriate profile reference in your onTokenGenerating callback script. The following example shows such a URL being set:

function onTokenGenerating(theUserSession, theAuthorizationRequestDetails) {

    // ..other functions not shown..