Template Macros

4. Template Macros

Template pages can be customized. The customization depends on the dynamic data (macros).

Three main sources of dynamic data:

  • Client metadata. For example, client_uri, tos_uri, logo_uri
  • User information. For example, given name, name, nickname, email
  • Incoming request. For example, response_type, state, authorization_details, claims

For static clients, the following metadata can be configured:

  • companyName
  • companyUrl
  • email
  • phone
  • contactPerson
  • contactType
  • otherInfo

For dynamic clients, the following metadata are defined by specification with similar purpose:

  • contacts
  • logo_uri
  • client_uri
  • policy_uri
  • tos_uri

The client metadata in the previous example, are available by default as a macro: @CLIENTEXT_{toUpper(name)}@.
For example, logo_uri is available as the macro @CLIENTEXT_LOGO_URI@.
Note: If such metadata does not exist, the string is empty.

For user and request information the following configuration allows you to specify the user and request macros that must be made available.

NameDescriptionExample
user_macrosList of authenticated user claims to be made available.display_name, given_name, family_name, name, email, age
request_macrosList of request parameters to be made available.response_type, state, authentication_details, claims, scope

The user macros are available as macro @USER_{toUpper(name)}@, while the request macros @RQST_{toUpper(name)}@.

For example, if you choose to display an authenticated user's age, it is available as @USER_AGE@.

Request parameters claims and authorization_details are available as macro @RQST_CLAIMS@ and @RQST_AUTHORIZATION_DETAILS@.
Note: For claims and authorization_details macros, if they don't exist, the default is {} and [].