Customizing WSO2 Identity Server UIs¶
From WSO2 Identity Server 5.9.0 onwards, a new UI extension has been introduced to easily customize the basic user interfaces like 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 customized JSP files along with the custom 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¶
In order to customize the header and footer content of the web applications, first you need to copy them to the newly cerated 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.jspandfooter.jspfiles into the<IS_HOME>/repository/deployment/server/webapps/authenticationendpoint/extensionsfolder.Note
The
header.jspandfooter.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.
<style type="text/css">
body {
background: #1e1e2f;
color: #ffffff;
}
.logo-container {
padding: 15px 30px;
}
header .brand img.logo {
height: 40px;
}
.wr-title {
background: #32344e !important;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.header {
border-top: 3px solid #1e8cf8;
background: #1e1e2f;
min-height: 70px;
border-bottom: 1px solid #31314b;
}
.....
a:hover,
a:active {
color: #3a9dff;
}
</style>Step 4: Edit the existing header and footer content¶
To add footer.jsp and header.jsp in extensions folder as follows:
-
To edit the header content of the authenticationendpoint web application:
-
Open the
header.jspfile in the/repository/deployment/server/webapps/authenticationendpoint/extensions` folder. -
Add the following includes:
<%@include file=”../localize.jsp” %> <%@include file=”../init-url.jsp” %>- Add the styles that you created in Step 3 inside the header tag as shown in the sample file.
-
-
To edit the footer content of the authenticationendpoint web application:
-
Open the
footer.jspfile in the/repository/deployment/server/webapps/authenticationendpoint/extensions` folder. -
Add the company name as shown in the sample file.
-
-
Similarly, you can customize 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 customized 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 custom changes.


