1
|
##
|
2
|
## Velocity Template for error end-state
|
3
|
##
|
4
|
## Velocity context will contain the following properties
|
5
|
## flowRequestContext - the Spring Web Flow RequestContext
|
6
|
## profileRequestContext - root of context tree
|
7
|
## encoder - HTMLEncoder class
|
8
|
## request - HttpServletRequest
|
9
|
## response - HttpServletResponse
|
10
|
## environment - Spring Environment object for property resolution
|
11
|
## custom - arbitrary object injected by deployer
|
12
|
##
|
13
|
#set ($title = $springMacroRequestContext.getMessage("idp.title", "Web Login Service"))
|
14
|
#set ($defaultTitleSuffix = $springMacroRequestContext.getMessage("idp.title.suffix", "Error"))
|
15
|
##
|
16
|
#if ($flowRequestContext)
|
17
|
## This handles flow events, the most common case.
|
18
|
#set ($eventId = $flowRequestContext.getCurrentEvent().getId())
|
19
|
#set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "error"))
|
20
|
#set ($titleSuffix = $springMacroRequestContext.getMessage("${eventKey}.title", "$defaultTitleSuffix"))
|
21
|
#set ($message = $springMacroRequestContext.getMessage("${eventKey}.message", "$defaultTitleSuffix: $eventId"))
|
22
|
#if ($eventId == "AccessDenied" or $eventId == "ContextCheckDenied")
|
23
|
$response.setStatus(403)
|
24
|
#elseif ($eventId == "AttributeReleaseRejected" || $eventId == "TermsRejected")
|
25
|
$response.setStatus(200)
|
26
|
#elseif ($eventKey == "unexpected" || $eventKey == "runtime-error" || $eventKey == "error")
|
27
|
$response.setStatus(500)
|
28
|
#else
|
29
|
$response.setStatus(400)
|
30
|
#end
|
31
|
#elseif ($exception)
|
32
|
## This handles exceptions that reach the Spring-MVC exception handler.
|
33
|
#set ($eventId = $exception.getClass().getSimpleName())
|
34
|
#set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "error"))
|
35
|
#set ($titleSuffix = $springMacroRequestContext.getMessage("${eventKey}.title", "$defaultTitleSuffix"))
|
36
|
#set ($message = $springMacroRequestContext.getMessage("${eventKey}.message", "$defaultTitleSuffix: $eventId"))
|
37
|
#else
|
38
|
## This is a catch-all that theoretically shouldn't happen?
|
39
|
#set ($titleSuffix = $defaultTitleSuffix)
|
40
|
#set ($message = $springMacroRequestContext.getMessage("idp.message", "An unidentified error occurred."))
|
41
|
#end
|
42
|
##
|
43
|
<!DOCTYPE html>
|
44
|
<html lang="en-gb" dir="ltr" vocab="http://schema.org/">
|
45
|
<head>
|
46
|
<meta charset="utf-8">
|
47
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
48
|
<meta name="description" content="OpenAIRE SSO"/>
|
49
|
<link rel="icon" type="image/png" sizes="32x32" href="$request.getContextPath()/images/favicon/favicon-32x32.png">
|
50
|
<link rel="icon" type="image/png" sizes="96x96" href="$request.getContextPath()/images/favicon//favicon-96x96.png">
|
51
|
<link rel="icon" type="image/png" sizes="16x16" href="$request.getContextPath()/images/favicon/favicon-16x16.png">
|
52
|
<link href="$request.getContextPath()/images/favicon/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
|
53
|
<title>$title - $titleSuffix</title>
|
54
|
## <link rel="stylesheet" type="text/css" href="$request.getContextPath()/css/main.css">
|
55
|
|
56
|
<script src="$request.getContextPath()/js/jquery.js"></script>
|
57
|
<script src="$request.getContextPath()/js/uikit.js"></script>
|
58
|
<link rel="stylesheet" type="text/css" href="$request.getContextPath()/css/theme.css">
|
59
|
<link rel="stylesheet" type="text/css" href="$request.getContextPath()/css/custom.css">
|
60
|
<link rel="stylesheet" type="text/css" href="$request.getContextPath()/css/aai-custom.css">
|
61
|
</head>
|
62
|
|
63
|
<body class="" style="">
|
64
|
<div class="uk-offcanvas-content uk-height-viewport">
|
65
|
<!-- MENU STARTS HERE-->
|
66
|
<div class="tm-header tm-header-transparent" uk-header="">
|
67
|
<div class="uk-container uk-container-expand">
|
68
|
<nav class="uk-navbar" uk-navbar="{"align":"left"}">
|
69
|
<div class="uk-navbar-center">
|
70
|
<div class="uk-logo uk-navbar-item">
|
71
|
<img alt="OpenAIRE" class="uk-responsive-height" src="$request.getContextPath()/images/Logo_Horizontal.png">
|
72
|
</div>
|
73
|
</div>
|
74
|
</nav>
|
75
|
</div>
|
76
|
</div>
|
77
|
<!-- MENU ENDS HERE -->
|
78
|
<div class="first_page_section uk-section-default uk-section uk-padding-remove-vertical">
|
79
|
<div class="first_page_banner_headline uk-grid-collapse uk-flex-middle uk-margin-remove-vertical uk-grid" uk-grid="">
|
80
|
</div>
|
81
|
</div>
|
82
|
|
83
|
|
84
|
<div class=" uk-section uk-margin-large-top tm-middle custom-main-content" id="tm-main">
|
85
|
<div class="uk-container">
|
86
|
<div uk-grid="" class="uk-grid uk-grid-stack">
|
87
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-align-center uk-first-column">
|
88
|
<div>
|
89
|
<h3>$title - $titleSuffix</h3>
|
90
|
|
91
|
#evaluate($message)
|
92
|
|
93
|
</div>
|
94
|
</div>
|
95
|
</div>
|
96
|
</div>
|
97
|
</div>
|
98
|
<!-- FOOTER STARTS HERE-->
|
99
|
<div class="custom-footer">
|
100
|
<div class="uk-section-primary uk-section uk-section-small">
|
101
|
<div class="uk-container">
|
102
|
<div class="uk-grid-margin uk-grid uk-grid-stack" uk-grid="">
|
103
|
<div class="uk-width-1-1@m uk-first-column">
|
104
|
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-center">
|
105
|
<img alt="OpenAIRE" class="el-image" src="$request.getContextPath()/images/Logo_Horizontal_white_small.png">
|
106
|
</div>
|
107
|
<div class="footer-license uk-margin uk-margin-remove-bottom uk-text-center uk-text-lead">
|
108
|
<div><a href="http://creativecommons.org/licenses/by/4.0/" rel="license" target="_blank"><img alt="Creative" src="$request.getContextPath()/images/80x15.png" style="height: auto; max-width: 100%; vertical-align: middle;"></a> UNLESS OTHERWISE INDICATED, ALL MATERIALS CREATED BY THE OPENAIRE CONSORTIUM ARE LICENSED UNDER A <a href="http://creativecommons.org/licenses/by/4.0/" rel="license">CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL LICENSE</a>.</div>
|
109
|
<div>OPENAIRE IS POWERED BY <a href="http://www.d-net.research-infrastructures.eu/" target="_blank">D-NET</a>.</div>
|
110
|
</div>
|
111
|
<div class="uk-margin uk-margin-remove-top uk-margin-remove-bottom uk-text-right">
|
112
|
<a class="uk-totop uk-icon" href="#" uk-scroll="" uk-totop=""></a>
|
113
|
</div>
|
114
|
</div>
|
115
|
</div>
|
116
|
</div>
|
117
|
</div>
|
118
|
</div>
|
119
|
</div>
|
120
|
</body>
|
121
|
</html>
|