-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
183 additions
and
21 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
30 changes: 30 additions & 0 deletions
30
...in/java/io/cos/cas/osf/authentication/exception/InstitutionSsoOsfApiFailureException.java
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,30 @@ | ||
package io.cos.cas.osf.authentication.exception; | ||
|
||
import lombok.NoArgsConstructor; | ||
|
||
import javax.security.auth.login.AccountException; | ||
|
||
/** | ||
* Describes an authentication error condition when connection failures and/or server errors happen between | ||
* CAS and OSF API during institution SSO. | ||
* | ||
* @author Longze Chen | ||
* @since 22.1.3 | ||
*/ | ||
@NoArgsConstructor | ||
public class InstitutionSsoOsfApiFailureException extends AccountException { | ||
|
||
/** | ||
* Serialization metadata. | ||
*/ | ||
private static final long serialVersionUID = -620313210360224932L; | ||
|
||
/** | ||
* Instantiates a new {@link InstitutionSsoOsfApiFailureException}. | ||
* | ||
* @param msg the msg | ||
*/ | ||
public InstitutionSsoOsfApiFailureException(final String msg) { | ||
super(msg); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -693,6 +693,9 @@ screen.institutionssofailed.message=Your request cannot be completed at this tim | |
screen.institutionselectivessofailed.message=Your institutional account is unable to authenticate to OSF. \ | ||
Please check with your institution. If your institution believes this is in error, please contact \ | ||
<a style="white-space: nowrap" href="mailto:[email protected]">Support</a> for help. | ||
screen.institutionosfapifailure.message=Your request cannot be completed at this time due to an unexpected error. Please \ | ||
<a style="white-space: nowrap" href="{0}">return to OSF</a> 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. | ||
# | ||
# OAuth 2.0 Views and Error Views | ||
# | ||
|
49 changes: 49 additions & 0 deletions
49
src/main/resources/templates/casInstitutionOsfApiFailureView.html
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,49 @@ | ||
<!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.institutionssofailed.title}"></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"> | ||
<h1 th:utext="#{screen.institutionssofailed.heading}"></h1> | ||
<p th:utext="#{screen.institutionosfapifailure.message}"></p> | ||
</section> | ||
<section class="form-button"> | ||
<a class="mdc-button mdc-button--raised button-osf-blue" th:href="@{/logout(service=${osfUrl.logout})}"> | ||
<span class="mdc-button__label" th:utext="#{screen.authnerror.button.backtoosf}"></span> | ||
</a> | ||
</section> | ||
<hr class="my-4" /> | ||
<section class="text-with-mdi" th:with="loginUrl=@{${@casServerLoginUrl}(casRedirectSource=cas)}"> | ||
<span><a th:href="@{/logout(service=${loginUrl})}" th:utext="#{screen.error.page.loginagain}"></a></span> | ||
</section> | ||
</section> | ||
</div> | ||
|
||
<script type="text/javascript"> | ||
disableSignUpButton(); | ||
</script> | ||
|
||
</div> | ||
</body> | ||
|
||
</html> |