Re-branding WSO2 Identity Server UIs¶
From WSO2 Identity Server 5.9.0 onwards, a new UI extension has been introduced to easily re-brand basic user interfaces like the login page, username and password recovery pages, and single sign-on pages.
All these UIs are available in the authenticationendpoint and accountrecoveryendpoint web apps that are located in the <IS_HOME>/repository/deployment/server/webapps folder. To customize these pages, follow the steps below.
Step 1: Create the extensions folder¶
-
Navigate to the
<IS_HOME>/repository/deployment/server/webapps/authenticationendpointfolder and create a new folder calledextensions.Info
You will be adding the modified JSP files along with the modified CSS files into this new
extensionsfolder. -
Similarly, navigate to the
<IS_HOME>/repository/deployment/server/webapps/accountrecoveryendpointfolder and create anextensionsfolder.
Step 2: Copy the existing header and footer content¶
To re-brand the header and footer content of the web applications, first copy them over to the newly created extensions folders.
-
To copy the header and footer content of the authenticationendpoint web application:
-
Navigate to the
<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/includesfolder. -
Copy the
header.jspandproduct-footer.jspfiles into the<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/extensionsfolder.Note
The
header.jspandproduct-footer.jspfiles have the capability to override the corresponding files in theincludesfolder.
-
-
Similarly, copy the header and footer content of the accountrecoveryendpoint web application.
Step 3: Create styling¶
Create the basic CSS styles that are required to override the existing UI styling.
```css tab="Example"
```
Step 4: Edit the existing header and footer content¶
Add the product-footer.jsp and header.jsp files to the extensions folder as follows:
-
To edit the header content of the authenticationendpoint web application:
-
Open the
header.jspfile in the<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/extensionsfolder. -
Add the following includes.
<%@include file=”../includes/localize.jsp” %> <%@include file=”../includes/init-url.jsp” %>- Replace the contents of the
<style>tag, with the styles you created in Step 3 inside the header tag.
-
-
To edit the footer content of the authenticationendpoint web application:
-
Open the
product-footer.jspfile in the<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/extensionsfolder. -
To add the company name, replace the content of
<footer> tagwith the following.html <footer class="footer"> <div class="container-fluid"> <p>XYZ Company | © <script>document.write(new Date().getFullYear());</script> <a href="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "business.homepage")%>" target="_blank"> <i class="icon fw fw-wso2"></i> <%=AuthenticationEndpointUtil.i18n(resourceBundle, "Inc")%> </a> . <%=AuthenticationEndpointUtil.i18n(recoveryResourceBundle, "All.rights.reserved")%> </p> </div> </footer>
-
-
Similarly, you can re-brand the accountrecovery web application header and footer.
Note
Make sure to add the following include to the top, when editing the
header.jspfile of the accountrecovery web application.<%@include file=”../localize.jsp” %> -
Refresh the browser and check out the modified header and footer content.
Tip
Restarting the server is NOT required to reflect the changes—browser refresh will display the changes.
Customized Recover Username page
Note
One advantage of this approach is that WUM updates will not affect your UI changes and you need not worry about manually adding your changes.


