Templates
The OneWelcome Identity Platform uses the Thymeleaf template engine to serve pages to the user via a browser. The templates can be customized to align their look and feel with your mobile application or company standards.
Customizing templates
The OneWelcome Identity Platform uses template sets that contain one or more custom templates. The default template is used when a specific template is not available in the template set. One custom template set can be marked as the default template set for all applications and web clients.
After you customize templates, you can upload them. To add the new template set, follow the directory structure in the configured Git repository. Refer to the default template set to further customize templates.
In the templates, the Thymeleaf Layout Dialect and Thymeleaf With Dialect are supported. The template file names are hardcoded and must not be changed in the custom template set. The contents of the template, such as message keys and fragments, can be different. For more details about the different templates supported by the OneWelcome Identity Platform, see templates customization.
Configuring an application-specific template set
For each mobile application and web client, a template set can be configured to render screens in the look and feel of this application or web client. When no template set is configured for an application or web client, the default template set is used to render these screens.
Resolving templates
The OneWelcome Identity Platform resolves templates in the following order:
-
The template set configured for the application or web client of the current request
-
When the template is not present in this set, the default template set
-
When no default template set is available, the templates bundled with the OneWelcome Identity Platform
Hidden form inputs
Some templates and fragments contain a hidden form input to submit a Cross-Site Request Forgery (CSRF) token. These fields are required for the application to function properly. Do not remove these input fields from the templates.
Static resources
An application server like the OneWelcome Identity Platform is not optimized for server static resources like javascript, images, and CSS files. Therefore serving custom static resources is not supported. There are some options on how to use custom static resources:
-
Embed the static resources in the HTML of the templates. The downside is that the client cannot cache the static resource.
-
Serve the static resources via your own content management system.