Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error page for UAE Pass authenticator #7288

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/orange-mirrors-appear.md
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
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,10 @@ hypr.generic.error=Authentication failed. Please try again later.
hypr.auth.start=Authentication in progress. Please wait...
hypr.invalid.email=Please enter a valid email address as the username.

# UAE Pass
error.uaepass.title=Failed Authentication with UAE PASS
pavinduLakshan marked this conversation as resolved.
Show resolved Hide resolved
error.uaepass.cancelled=User cancelled the login.

# iProov

iproov.heading=Login with your bio-metric authenticator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ hypr.generic.error=Authentifizierung fehlgeschlagen. Bitte versuchen Sie es spä
hypr.auth.start=Authentifizierung läuft. Warten Sie mal...
hypr.invalid.email=Bitte geben Sie als Benutzernamen eine gültige E-Mail-Adresse ein.

# UAE Pass
error.uaepass.title=Authentifizierung mit UAE PASS fehlgeschlagen
error.uaepass.cancelled=Authentifizierung vom Benutzer abgebrochen.

# Errors
error.occurred=Ein Fehler ist aufgetreten
error.400=Fehler 400 - schlechte Anfrage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ hypr.generic.error=La autenticación falló. Por favor, inténtelo de nuevo más
hypr.auth.start=Autenticación en curso. Espere por favor...
hypr.invalid.email=Introduzca una dirección de correo electrónico válida como nombre de usuario.

# UAE Pass
error.uaepass.title=Autenticación fallida con UAE PASS
error.uaepass.cancelled=Autenticación cancelada por el usuario.

# Errors
error.occurred=Se produjo un error
error.400=Error 400 - Solicitud incorrecta
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,10 @@ hypr.generic.error=Authentification échouée. Veuillez réessayer plus tard.
hypr.auth.start=Authentification en cours. S'il vous plaît, attendez...
hypr.invalid.email=S'il vous plaît, mettez une adresse email valide

# UAE Pass
error.uaepass.title=Échec de l'authentification avec UAE PASS
error.uaepass.cancelled=Authentification annulée par l'utilisateur.

# Errors
error.occurred=Erreur est survenue
error.400=Erreur 400 - Demande incorrecte
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ hypr.generic.error=認証に失敗しました。後でもう一度やり直し
hypr.auth.start=進行中の認証。お待ちください...
hypr.invalid.email=有効なメールアドレスをユーザー名として入力してください。

# UAE Pass
error.uaepass.title=UAE PASS による認証に失敗しました
error.uaepass.cancelled=ユーザーによって認証がキャンセルされました。

## Errors
error.occurred=エラーが発生しました
error.400=エラー 400 - 不正なリクエスト
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ hypr.generic.error=A autenticação falhou. Por favor, tente novamente mais tard
hypr.auth.start=Autenticação em andamento. Por favor, aguarde...
hypr.invalid.email=Insira um endereço de e-mail válido como nome de usuário.

# UAE Pass
error.uaepass.title=Falha na autenticação com UAE PASS
error.uaepass.cancelled=Autenticação cancelada pelo usuário.

# Errors
error.occurred=Ocorreu um erro
error.400=Erro 400 - Bad Request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@ hypr.generic.error=A autenticação falhou. Por favor, tente novamente mais tard
hypr.auth.start=Autenticação em andamento. Por favor, aguarde...
hypr.invalid.email=Insira um endereço de e-mail válido como nome de usuário.

# UAE Pass
error.uaepass.title=Falha na autenticação com o UAE PASS
error.uaepass.cancelled=Autenticação cancelada pelo utilizador.

# Errors
error.occurred=Ocorreu um erro
error.400=Erro 400 - Pedido ruim
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,10 @@ hypr.generic.error=身份验证失败。请稍后再试。
hypr.auth.start=正在进行的身份验证。请稍等...
hypr.invalid.email=请输入有效的电子邮件地址作为用户名。

# UAE Pass
error.uaepass.title=使用 UAE PASS 进行身份验证失败
error.uaepass.cancelled=用户取消了身份验证。

## Errors
error.occurred=错误发生
error.400=错误400-不良要求
Expand Down
pavinduLakshan marked this conversation as resolved.
Show resolved Hide resolved
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 = AuthenticationEndpointUtil.i18n(resourceBundle, "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")) {
pavinduLakshan marked this conversation as resolved.
Show resolved Hide resolved
errorMessage = AuthenticationEndpointUtil.i18n(resourceBundle, "error.uaepass.cancelled");
} else {
errorMessage = AuthenticationEndpointUtil.i18n(resourceBundle, "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><%=AuthenticationEndpointUtil.i18n(resourceBundle, "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>
Loading