Skip to content

Commit

Permalink
Merge branch 'hotfix/21.2.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
cslzchen committed May 18, 2021
2 parents 00cc091 + a3f94b2 commit 3278e37
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 41 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

21.2.5 (05-18-2021)
===================

Customize pac4j stop web flow view

21.2.4 (05-04-2021)
===================
Expand Down
2 changes: 1 addition & 1 deletion etc/cas/services/local/cas-203948234207100.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@class": "org.apereo.cas.services.RegexRegisteredService",
"serviceId": "^https?://(localhost|127\\.0\\.0\\.1|192\\.168\\.168\\.167)(|:8080|:8443)/.*",
"serviceId": "^https?://(localhost|127\\.0\\.0\\.1|192\\.168\\.168\\.167|accounts\\.test\\.osf\\.io)(|:8080|:8443)/.*",
"name": "",
"description": "",
"id": 203948234207100,
Expand Down
39 changes: 0 additions & 39 deletions etc/cas/services/local/oauth-202102121211021.json

This file was deleted.

9 changes: 9 additions & 0 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,15 @@ screen.oauth.confirm.backtoosf=Exit and go back to OSF
screen.oauth.error.title=OAuth Error
screen.oauth.error.heading=Authorization failed
screen.oauth.error.exit=Exit
#
# Pac4j Authentication Delegation Error Views
#
screen.pac4j.error.title=SSO Error
screen.pac4j.error.heading=Delegated authentication error
screen.pac4j.error.message=Your request cannot be completed at this time. Either the authentication request was \
rejected / cancelled, or the authentication provider denied access due to permissions, privacy settings, etc. \
Please exit login and try again later.</br></br>If the issue persists, please contact <a style="white-space: \
nowrap" href="mailto:[email protected]">Support</a> for help.
#################################################
# Enf of OSF CAS customized messages.properties #
# ###############################################
57 changes: 57 additions & 0 deletions src/main/resources/templates/casPac4jStopWebflow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layoutosf}">

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

<title th:text="#{screen.pac4j.error.title}">Pac4j Stop Webflow View</title>
<link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
</head>

<body class="mdc-typography">
<div layout:fragment="content" class="d-flex justify-content-center">

<div class="d-flex justify-content-center flex-md-row flex-column mdc-card mdc-card-content w-lg-30">
<section class="login-error-card">
<section>
<div th:replace="fragments/osfbannerui :: osfBannerUI">
<a href="fragments/osfbannerui.html"></a>
</div>
</section>
<section class="text-without-mdi text-center text-bold text-large margin-large-vertical title-danger">
<span th:utext="#{screen.authnerror.tips}"></span>
</section>
<hr class="my-4" />
<section class="card-message">
<h2 th:utext="#{screen.pac4j.error.heading}"></h2>
<p th:utext="#{screen.pac4j.error.message}"></p>
</section>
<section id="errorInfo" class="pre-formatted-small word-break-all">
<pre id="initiatorUrl"></pre>
<pre th:if="${rootCauseException}" th:text="${'Error: ' + rootCauseException.getClass().getSimpleName()}"></pre>
<pre th:if="${rootCauseException}" th:text="${'Message: ' + rootCauseException.getMessage()}"></pre>
<pre th:if="${service}" th:text="${'Service: ' + service}"></pre>
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
</section>
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">
<span class="mdc-button__label" th:utext="#{screen.error.page.loginagain}"></span>
</a>
</section>
<hr class="my-4" />
<section class="text-with-mdi">
<span><a th:href="@{/logout(service=${osfUrl.logout})}" th:utext="#{screen.authnerror.button.backtoosf}"></a></span>
</section>
</section>
</div>

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

</div>
</body>

</html>
8 changes: 8 additions & 0 deletions src/main/resources/templates/casServiceErrorView.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@
<h2 th:utext="#{screen.service.error.heading}"></h2>
<p th:if="${rootCauseException != null and rootCauseException.code != null}" th:utext="#{${rootCauseException.code}}"></p>
</section>
<section id="errorInfo" class="pre-formatted-small word-break-all">
<pre id="initiatorUrl"></pre>
<pre th:if="${rootCauseException}" th:text="${'Error: ' + rootCauseException.getClass().getSimpleName()}"></pre>
<pre th:if="${rootCauseException}" th:text="${'Message: ' + rootCauseException.getMessage()}"></pre>
<pre th:if="${service}" th:text="${'Service: ' + service}"></pre>
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
</section>
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">
<span class="mdc-button__label" th:utext="#{screen.error.page.loginagain}"></span>
Expand All @@ -41,6 +48,7 @@ <h2 th:utext="#{screen.service.error.heading}"></h2>

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

</div>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ <h2 th:utext="#{screen.unavailable.heading}"></h2>
<section id="errorInfo" class="pre-formatted-small word-break-all">
<pre id="initiatorUrl"></pre>
<pre th:utext="${'Error: ' + status + ' - ' + error}"></pre>
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
<pre th:text="${'Message: ' + message}"></pre>
<pre th:if="${service}" th:text="${'Service: ' + service}"></pre>
<pre th:utext="${'Timestamp: ' + #dates.formatISO(#dates.createNow())}"></pre>
</section>
<section class="form-button" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}">
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${loginUrl})}">
Expand Down

0 comments on commit 3278e37

Please sign in to comment.