-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7288 from hwupathum/uaepass-error
Add error page for UAE Pass authenticator
- Loading branch information
Showing
10 changed files
with
170 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@wso2is/identity-apps-core": patch | ||
--- | ||
|
||
Add error page for UAE Pass authenticator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
133 changes: 133 additions & 0 deletions
133
identity-apps-core/apps/authentication-portal/src/main/webapp/uaePassError.jsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<%-- | ||
~ Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com). | ||
~ | ||
~ WSO2 LLC. licenses this file to you under the Apache License, | ||
~ Version 2.0 (the "License"); you may not use this file except | ||
~ in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, | ||
~ software distributed under the License is distributed on an | ||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
~ KIND, either express or implied. See the License for the | ||
~ specific language governing permissions and limitations | ||
~ under the License. | ||
--%> | ||
|
||
<%@ page import="org.owasp.encoder.Encode" %> | ||
<%@ page import="org.wso2.carbon.identity.application.authentication.endpoint.util.Constants" %> | ||
<%@ page import="org.wso2.carbon.identity.authenticator.emailotp.EmailOTPAuthenticatorConstants" %> | ||
<%@ page import="java.io.File" %> | ||
<%@ page import="java.util.Map" %> | ||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> | ||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> | ||
<%@ taglib prefix="layout" uri="org.wso2.identity.apps.taglibs.layout.controller" %> | ||
<%@ include file="includes/localize.jsp" %> | ||
|
||
<%-- Include tenant context --%> | ||
<jsp:directive.include file="includes/init-url.jsp"/> | ||
|
||
<%-- Branding Preferences --%> | ||
<jsp:directive.include file="includes/branding-preferences.jsp"/> | ||
|
||
<% | ||
request.getSession().invalidate(); | ||
String queryString = request.getQueryString(); | ||
String errorMessage = i18n(resourceBundle, customText, "error.retry"); | ||
String authenticationFailed = "false"; | ||
if (Boolean.parseBoolean(request.getParameter(Constants.AUTH_FAILURE))) { | ||
authenticationFailed = "true"; | ||
if (request.getParameter(Constants.AUTH_FAILURE_MSG) != null) { | ||
errorMessage = request.getParameter(Constants.AUTH_FAILURE_MSG); | ||
if (errorMessage.equalsIgnoreCase("cancelled.on.app")) { | ||
errorMessage = i18n(resourceBundle, customText, "error.uaepass.cancelled"); | ||
} else { | ||
errorMessage = i18n(resourceBundle, customText, "error.retry"); | ||
} | ||
} | ||
} | ||
%> | ||
|
||
<%-- Data for the layout from the page --%> | ||
<% | ||
layoutData.put("containerSize", "medium"); | ||
%> | ||
|
||
<html lang="en-US"> | ||
<head> | ||
<%-- header --%> | ||
<% | ||
File headerFile = new File(getServletContext().getRealPath("extensions/header.jsp")); | ||
if (headerFile.exists()) { | ||
%> | ||
<jsp:include page="extensions/header.jsp"/> | ||
<% } else { %> | ||
<jsp:include page="includes/header.jsp"/> | ||
<% } %> | ||
|
||
<!--[if lt IE 9]> | ||
<script src="js/html5shiv.min.js"></script> | ||
<script src="js/respond.min.js"></script> | ||
<![endif]--> | ||
</head> | ||
|
||
<body class="login-portal layout email-otp-portal-layout"> | ||
<layout:main layoutName="<%= layout %>" layoutFileRelativePath="<%= layoutFileRelativePath %>" data="<%= layoutData %>" > | ||
<layout:component componentName="ProductHeader"> | ||
<%-- product-title --%> | ||
<% | ||
File productTitleFile = new File(getServletContext().getRealPath("extensions/product-title.jsp")); | ||
if (productTitleFile.exists()) { | ||
%> | ||
<jsp:include page="extensions/product-title.jsp"/> | ||
<% } else { %> | ||
<jsp:include page="includes/product-title.jsp"/> | ||
<% } %> | ||
</layout:component> | ||
<layout:component componentName="MainSection"> | ||
<div class="ui segment"> | ||
<%-- page content --%> | ||
<h2><%=i18n(resourceBundle, customText, "error.uaepass.title")%> | ||
</h2> | ||
<div class="ui divider hidden"></div> | ||
<% | ||
if ("true".equals(authenticationFailed)) { | ||
%> | ||
<div class="ui negative message" id="failed-msg"><%=Encode.forHtmlContent(errorMessage)%> | ||
</div> | ||
<% } %> | ||
</div> | ||
</layout:component> | ||
<layout:component componentName="ProductFooter"> | ||
<%-- product-footer --%> | ||
<% | ||
File productFooterFile = new File(getServletContext().getRealPath("extensions/product-footer.jsp")); | ||
if (productFooterFile.exists()) { | ||
%> | ||
<jsp:include page="extensions/product-footer.jsp"/> | ||
<% } else { %> | ||
<jsp:include page="includes/product-footer.jsp"/> | ||
<% } %> | ||
</layout:component> | ||
<layout:dynamicComponent filePathStoringVariableName="pathOfDynamicComponent"> | ||
<jsp:include page="${pathOfDynamicComponent}" /> | ||
</layout:dynamicComponent> | ||
</layout:main> | ||
|
||
<%-- footer --%> | ||
<% | ||
File footerFile = new File(getServletContext().getRealPath("extensions/footer.jsp")); | ||
if (footerFile.exists()) { | ||
%> | ||
<jsp:include page="extensions/footer.jsp"/> | ||
<% } else { %> | ||
<jsp:include page="includes/footer.jsp"/> | ||
<% } %> | ||
</body> | ||
</html> |