Loading...

Theming

AuthStack supports theming of the frontend templates. It's therefore possible to incorporate your own corporate branding and templates, which users will see when they login to their applications and websites.

Introduction

It's possible to add any additional bespoke functionality you require, using JavaScript, HTML and CSS. Whether it's mobile or accessibility support, you have complete freedom.

AuthStack ships with a default theme, which we recommend you do not modify, as further updates may overwrite these changes.

If you wish to create your own theme, there are two options, the first being to simply copy the default directory, then replace the content as required.

The second is to run the following command

authstack-ctl theme:new yourtheme

The theme will be created based on the default theme.

When you are ready to load your theme, simply change the environment variable within the env file in order to load the new theme.

ROOT . /www/env/.env

Look for APP_THEME=default and change to the same name as your desired theme.

Template Engine

The AuthStack templating engine is powered by Blade.

More information about how to work with the Blade template engine can be found on the Laravel website.

Blade is the simple, yet powerful templating engine provided with Laravel. Unlike other popular PHP templating engines, Blade does not restrict you from using plain PHP code in your views. In fact, all Blade views are compiled into plain PHP code and cached until they are modified, meaning Blade adds essentially zero overhead to your application. Blade view files use the .blade.php file extension and are typically stored in the resources/views directory.

Listing Themes

The CLI tool contains a command to check which themes are available. To list all themes, use the following command:

authstack-ctl theme:list

Checking Themes

If you are having issues with a theme or wish to perform sanity checks before pushing into production, there is a CLI command which will check your theme against the default theme. Any missing files will be highlighted. To check your theme against the default theme, use the following command:

authstack-ctl theme:check yourtheme

Modifying Themes

Themes can be found within the following folder:

ROOT . /resources/views/themes

The default theme contains the following files. Please remember to create a new theme if you wish to modify and extend the base theme. Further updates to the default theme will overwrite your changes.

File Role
SAML/response.blade.php Displayed when user has JavaScript disabled and no multifactor authentication is available for that account
administration/sign_in.blade.php HTML for administrative sign in (/administration in URL)
authenticated/index.blade.php Displayed when user is authenticated to AuthStack, be it over SSO or System Authentication driver
errors/401.blade.php Handles HTTP 401 errors (abort(401) Laravel function)
errors/403.blade.php Handles HTTP 403 errors (abort(403) Laravel function
errors/404.blade.php Handles HTTP 404 errors (abort(404) Laravel function
errors/503.blade.php Handles HTTP 503 error (Service unavailable)
errors/invalid_authn.blade.php When SAML Authentication request is invalid, this view handles error rendering
errors/invalid_xml_signature.blade.php If XML signature is required by AuthStack and if SP did not provide a valid one, this view handles error rendering
errors/license_error.blade.php Handles license related errors
errors/unknown_service_provider.blade.php When Service Provider is not known to AuthStack and it tries to make AuthN / SLO request, this view handles the error
errors/user_count_exceeded.blade.php If user count is exceeded, this view will handle error rendering
apps.blade.php Responsible for showing available service providers at frontend (user does not have to be authenticated to view it)
index.blade.php Index page for AuthStack
logged_out.blade.php When user logs out from administration, this view handles the rendering
slo.blade.php Not currently used
sso.blade.php View responsible for rendering Single Sign-On form and page

Previous Article

Creating an Admin User

Next Article

Localisation

We're happy to talk

Our offices are open 8.30am - 7pm GMT, Monday to Friday - but you can always contact us via email. When we receive your email during opening hours, we aim to respond within 30 minutes or less. Should your email reach us out of hours, we will contact you when the office re-opens.

You can contact us using live chat