The default look and feel of the EmpowerID Web application can be changed by overriding the CSS rules and logos used by EmpowerID. In this way, you can style the Web application to match your corporate brand or that of a partner who uses the Web application. This topic demonstrates this by changing the theme of the EmpowerID Web application based on the FQDN of the server used to access the application. The components of the application that will be changed include the following:
The logo used by the Web application
The background image that appears on the login page
The title and content text that appears on the login page
Changing the theme in this way does not affect the way the application looks to users accessing it apart from the specified FQDN.
To accomplish the above, this topic is divided into the following activities:
To customize the EmpowerID Web application in the manner discussed in this topic, you must first create a new folder named after the FQDN or fully resolvable DNS of the tenant in the Overrides/Tenants directory of the EmpowerID Web CDN. For a typical installation of EmpowerID, the path to the folder would be "\Program Files\TheDotNetFactory\EmpowerID\Web Sites\EmpowerID.Web.Cdn\Overrides\Tenants\CustomTenantFolder," where "CustomTenantFolder" is the name of the folder you are creating. Once you have added the folder, you need to do the following:
Create a child folder named Themes in the custom folder. For example, if you are creating a custom FQDN folder for a Tenant with a FQDN of sso.andysbeans.com, you first create a sso.empowerid.com folder in the above-mentioned director, then create within that folder the Themes folder.
Create a child folder named EmpowerID in the Themes folder.
Create a child folder named Images in the EmpowerID folder.
To change the default Web application logo and login page background image
From your EmpowerID server, navigate to the images folder you created within the custom tenant folder. The path to the folder should be "\Program Files\TheDotNetFactory\EmpowerID\Web Sites\EmpowerID.Web.Cdn\Overrides\Tenants\<YourCustomTenant>\Themes\EmpowerID\Images".
Place your custom Web application logo and login page background image in to the folder, as shown in the below image. In the image, the name of the custom logo is ABLogo and the name of the custom background image is ABShop, but the files can be named anything.
To create a CSS file that overrides the default CSS rules of the login page
Open a text editor and create a new CSS file named overrides.css, placing it within the EmpowerID folder you created earlier. The path to the file should be "\Program Files\TheDotNetFactory\EmpowerID\Web Sites\EmpowerID.Web.Cdn\Overrides\Tenants\<YourCustomTenant>\Themes\overrides.css.
Add code to overrides.css to replace the default Web application logo and login page background image.
In the following example, we are adding to overrides.css the CSS classes needed to override EmpowerID and setting the properties of those classes. When adding your code, be sure to name the classes (.eid-logo and .eid-login-custom) exactly as shown. If you do not, EmpowerID will ignore them.
/*custom background image for the login page*/
Add code to overrides.css to replace the default style of the title and content text of the login page.
In the following example, we are adding to overrides.css the CSS classes needed to override EmpowerID and setting the properties of those classes. When adding your code, be sure to name the classes (.eid-login-custom-title and .eid-login-custom-content) exactly as shown. If you do not, EmpowerID will ignore them.
/*custom title on the login page*/
/*custom title and content text for the login page*/
text-shadow: 1px 1px #663300;
Save your changes.
To test the custom theme
Open your browser and navigate to the EmpowerID Web application using the custom FQDN. For example, if you created a custom tenant folder named "sso.andysbeans.com," you navigate to "https://sso.andysbeans.com/EmpowerID."
You should see that the default theme of the EmpowerID Web application has been updated to reflect the changes you made.
Navigate to the default login page for the EmpowerID Web application in your environment. You should see the default theme.