Skip to content

Commit 3ffca0c

Browse files
committed
Add go back link to auth error
1 parent 37f9cec commit 3ffca0c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/main/java/eu/openanalytics/containerproxy/ui/AuthController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public Object getLoginPage(@RequestParam Optional<String> error, ModelMap map) {
8080
public String getAuthErrorPage(ModelMap map) {
8181
prepareMap(map);
8282
map.put("application_name", environment.getProperty("spring.application.name"));
83+
map.put("mainPage", ServletUriComponentsBuilder.fromCurrentContextPath().build().toUriString());
8384
return "auth-error";
8485
}
8586

src/main/resources/templates/auth-error.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<h2>An error occurred during the authentication procedure.</h2>
4040
<p><b>If you are a user of <span th:text="${application_name}"></span>:</b> please report this issue to your administrator and try to log out from your Identity Provider.</p>
4141
<p><b>If you are an administrator of <span th:text="${application_name}"></span>:</b> this error page is typically shown because of an configuration error in the authentication setup. See the logs for more information.</p>
42+
<a th:href="${mainPage}">Go back to the main page</a>
4243
</div>
4344

4445
<style>
@@ -50,4 +51,4 @@ <h2>An error occurred during the authentication procedure.</h2>
5051

5152
</body>
5253

53-
</html>
54+
</html>

0 commit comments

Comments
 (0)