Page tree
Skip to end of metadata
Go to start of metadata

It is possible to show different UI text depending on the template requested by the application by requesting a different display value in the OIDC authentication request.

Step-by-step guide

For an application using OpenID Connect.

The same application could show very different template and user interface text, depending on a combination of the template name listed in the Template Names field of Ubilogin Management and the value of the "display" variable sent in the authentication request.

The corresponding template will be chosen via the oidc.display value ("page","template","touch" or "wap").

Modify templates.properties

  1. Modify custom/templates.index to contain text the various templates

    christmas = templates/christmas.properties
    summer = templates/summer.properties
  2. Modify custom/templates/christmas.properties to contain settings for Christmas template

    oidc.display = page
    @LOGIN_TITLE_COLOR@ = red
  3. Modify custom/templates/summer.properties to contain settings for summer template

    oidc.display = touch
    @LOGIN_TITLE_COLOR@ = blue
  4. Set both template names in the "Template Names" field of the agent
  5. When creating an authentication request, specify the corresponding value in the display query string attribute. The following example will activate the "summer" template and correspondingly any user interface text specified with that template name will be used.

    GET https://sso.example.com/uas/oauth2/authorization?response_type=code&scope=openid&client_id=2001221477&redirect_uri=https://client.example.com/response&state=40e1bfc0-4587-4859-be08-a58e3fffa37a&display=touch

 

The name of the tempate chosen currently is visible at the /uas/info page if enabled.

The name of the tempate chosen currently is visible in the view() array in the source code of the login or error screens generated by Ubisecure SSO.