Skip to content

Commit 3278e37

Browse files
committed
Merge branch 'hotfix/21.2.5'
2 parents 00cc091 + a3f94b2 commit 3278e37

7 files changed

Lines changed: 81 additions & 41 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
We follow the CalVer (https://calver.org/) versioning scheme: YY.MINOR.MICRO.
44

5+
21.2.5 (05-18-2021)
6+
===================
7+
8+
Customize pac4j stop web flow view
59

610
21.2.4 (05-04-2021)
711
===================

etc/cas/services/local/cas-203948234207100.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@class": "org.apereo.cas.services.RegexRegisteredService",
3-
"serviceId": "^https?://(localhost|127\\.0\\.0\\.1|192\\.168\\.168\\.167)(|:8080|:8443)/.*",
3+
"serviceId": "^https?://(localhost|127\\.0\\.0\\.1|192\\.168\\.168\\.167|accounts\\.test\\.osf\\.io)(|:8080|:8443)/.*",
44
"name": "",
55
"description": "",
66
"id": 203948234207100,

etc/cas/services/local/oauth-202102121211021.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

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: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!DOCTYPE html>
2+
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layoutosf}">
3+
4+
<head>
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
7+
8+
<title th:text="#{screen.pac4j.error.title}">Pac4j Stop Webflow View</title>
9+
<link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
10+
</head>
11+
12+
<body class="mdc-typography">
13+
<div layout:fragment="content" class="d-flex justify-content-center">
14+
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>
47+
</div>
48+
49+
<script type="text/javascript">
50+
disableSignUpButton();
51+
document.getElementById("initiatorUrl").innerHTML = "Request URL: " + window.location.href;
52+
</script>
53+
54+
</div>
55+
</body>
56+
57+
</html>

src/main/resources/templates/casServiceErrorView.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@
2727
<h2 th:utext="#{screen.service.error.heading}"></h2>
2828
<p th:if="${rootCauseException != null and rootCauseException.code != null}" th:utext="#{${rootCauseException.code}}"></p>
2929
</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>
3037
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
3138
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">
3239
<span class="mdc-button__label" th:utext="#{screen.error.page.loginagain}"></span>
@@ -41,6 +48,7 @@ <h2 th:utext="#{screen.service.error.heading}"></h2>
4148

4249
<script type="text/javascript">
4350
disableSignUpButton();
51+
document.getElementById("initiatorUrl").innerHTML = "Request URL: " + window.location.href;
4452
</script>
4553

4654
</div>

src/main/resources/templates/error.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ <h2 th:utext="#{screen.unavailable.heading}"></h2>
3030
<section id="errorInfo" class="pre-formatted-small word-break-all">
3131
<pre id="initiatorUrl"></pre>
3232
<pre th:utext="${'Error: ' + status + ' - ' + error}"></pre>
33-
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
3433
<pre th:text="${'Message: ' + message}"></pre>
34+
<pre th:if="${service}" th:text="${'Service: ' + service}"></pre>
35+
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
3536
</section>
3637
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
3738
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">

0 commit comments

Comments
 (0)