Skip to content

Commit 723e3f7

Browse files
committed
Customize casPac4jStopWebflow.html with OSF-style and more details
1 parent 979fd89 commit 723e3f7

2 files changed

Lines changed: 52 additions & 50 deletions

File tree

src/main/resources/messages.properties

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,15 @@ screen.oauth.confirm.backtoosf=Exit and go back to OSF
705705
screen.oauth.error.title=OAuth Error
706706
screen.oauth.error.heading=Authorization failed
707707
screen.oauth.error.exit=Exit
708+
#
709+
# Pac4j Authentication Delegation Error Views
710+
#
711+
screen.pac4j.error.title=SSO Error
712+
screen.pac4j.error.heading=Delegated authentication error
713+
screen.pac4j.error.message=Your request cannot be completed at this time. Either the authentication request was \
714+
rejected / cancelled, or the authentication provider denied access due to permissions, privacy settings, etc. \
715+
Please exit login and try again later.</br></br>If the issue persists, please contact <a style="white-space: \
716+
nowrap" href="mailto:support@osf.io">Support</a> for help.
708717
#################################################
709718
# Enf of OSF CAS customized messages.properties #
710719
# ###############################################
Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,57 @@
11
<!DOCTYPE html>
2-
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">
2+
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layoutosf}">
33

44
<head>
55
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
66
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
77

8-
<title th:text="#{screen.pac4j.unauthz.pagetitle}">Pac4j Stop Webflow View</title>
8+
<title th:text="#{screen.pac4j.error.title}">Pac4j Stop Webflow View</title>
99
<link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
1010
</head>
1111

12-
<body>
13-
<main role="main" class="container mt-3 mb-3">
14-
<div layout:fragment="content" class="banner banner-danger mdc-card p-4 m-auto w-lg-66">
15-
<div class="">
16-
<h2 th:utext="#{screen.pac4j.unauthz.heading}">Unauthorized Access</h2>
17-
<p th:utext="#{screen.pac4j.unauthz.message}">Either the authentication request was rejected/cancelled,
18-
or
19-
the authentication provider denied access due to permissions, etc. Review logs to find the root
20-
cause of
21-
the issue.</p>
12+
<body class="mdc-typography">
13+
<div layout:fragment="content" class="d-flex justify-content-center">
2214

23-
<div class="mdc-data-table">
24-
<table th:if="${error != null or reason != null or code != null or description != null}"
25-
class="mdc-data-table__table w-100" aria-label="Error information">
26-
<thead>
27-
<tr class="mdc-data-table__header-row">
28-
<th class="mdc-data-table__header-cell">Error</th>
29-
<th class="mdc-data-table__header-cell">Reason</th>
30-
<th class="mdc-data-table__header-cell">Code</th>
31-
<th class="mdc-data-table__header-cell">Description</th>
32-
<th class="mdc-data-table__header-cell">Provider</th>
33-
<th class="mdc-data-table__header-cell">Destination</th>
34-
</tr>
35-
</thead>
36-
<tbody class="mdc-data-table__content">
37-
<tr class="mdc-data-table__row">
38-
<td class="mdc-data-table__cell" th:text="${error}">Error</td>
39-
<td class="mdc-data-table__cell" th:text="${reason}">reason</td>
40-
<td class="mdc-data-table__cell" th:text="${code}">code</td>
41-
<td class="mdc-data-table__cell" th:text="${description}">description</td>
42-
<td class="mdc-data-table__cell" th:text="${client}">client</td>
43-
<td class="mdc-data-table__cell">
44-
<a th:href="${service}" th:text="#{screen.pac4j.unauthz.gotoapp}">Goto
45-
Application</a>
46-
</td>
47-
</tr>
48-
</tbody>
49-
</table>
50-
</div>
51-
</div>
52-
<div class="d-flex">
53-
<a class="mdc-button mdc-button--raised mr-2" th:href="@{/login}">
54-
<span class="mdc-button__label" th:text="#{screen.pac4j.unauthz.login}">Back to CAS</span>
55-
</a>
56-
<a class="mdc-button mdc-button--outlined" th:href="${service}">
57-
<span class="mdc-button__label" th:text="#{screen.pac4j.unauthz.gotoapp}">Goto Application</span>
58-
</a>
59-
</div>
15+
<div class="d-flex justify-content-center flex-md-row flex-column mdc-card mdc-card-content w-lg-30">
16+
<section class="login-error-card">
17+
<section>
18+
<div th:replace="fragments/osfbannerui :: osfBannerUI">
19+
<a href="fragments/osfbannerui.html"></a>
20+
</div>
21+
</section>
22+
<section class="text-without-mdi text-center text-bold text-large margin-large-vertical title-danger">
23+
<span th:utext="#{screen.authnerror.tips}"></span>
24+
</section>
25+
<hr class="my-4" />
26+
<section class="card-message">
27+
<h2 th:utext="#{screen.pac4j.error.heading}"></h2>
28+
<p th:utext="#{screen.pac4j.error.message}"></p>
29+
</section>
30+
<section id="errorInfo" class="pre-formatted-small word-break-all">
31+
<pre id="initiatorUrl"></pre>
32+
<pre th:if="${rootCauseException}" th:text="${'Error: ' + rootCauseException.getClass().getSimpleName()}"></pre>
33+
<pre th:if="${rootCauseException}" th:text="${'Message: ' + rootCauseException.getMessage()}"></pre>
34+
<pre th:if="${service}" th:text="${'Service: ' + service}"></pre>
35+
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
36+
</section>
37+
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
38+
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">
39+
<span class="mdc-button__label" th:utext="#{screen.error.page.loginagain}"></span>
40+
</a>
41+
</section>
42+
<hr class="my-4" />
43+
<section class="text-with-mdi">
44+
<span><a th:href="@{/logout(service=${osfUrl.logout})}" th:utext="#{screen.authnerror.button.backtoosf}"></a></span>
45+
</section>
46+
</section>
6047
</div>
61-
</main>
48+
49+
<script type="text/javascript">
50+
disableSignUpButton();
51+
document.getElementById("initiatorUrl").innerHTML = "Request URL: " + window.location.href;
52+
</script>
53+
54+
</div>
6255
</body>
6356

6457
</html>

0 commit comments

Comments
 (0)