-
-
Notifications
You must be signed in to change notification settings - Fork 44
Layout Customization
openvpn-auth-oauth2 supports custom templates for the login page. The template must be a valid HTML file.
The default template is here: index.gohtml
Available variables:
-
{{.title}}:Access deniedorAccess granted -
{{.message}}: Potential error message or success message -
{{.errorID}}: ErrorID of an error, if present
The go template engine is used to render the HTML file.
To override the default assets, you can configure http.assets-path with the path to the directory containing the assets.
The default assets are here:
-
style.css: CSS file to enrich the default layout. By default, it is empty. -
mvp.css: MVP css framework -
favicon.png: Favicon of the login page -
i18n.js: Localization script -
i18n/<lang>.json: Language specific localization file. is the language code, e.g.,enfor English. See de.json for an example.
If you want to provide custom localization, you have to configure http.assets-path first. In the assets directory,
create a new directory named i18n and put your localization files in there. The file name must be the language code
followed by .json. For example, en.json for English.
Instead, providing a custom localization file locally, think about to submit a pull request to the project to provide the localization for everyone.
This wiki is synced with the docs folder from the code repository! To improve the wiki, create a pull request against the code repository with the suggested changes.