1 |
49495
|
tsampikos.
|
## Velocity Template for login error message production, included by login.vm
|
2 |
|
|
##
|
3 |
|
|
## authenticationErrorContext - context containing error data, if available
|
4 |
|
|
##
|
5 |
|
|
#if ($authenticationErrorContext && $authenticationErrorContext.getClassifiedErrors().size() > 0 && $authenticationErrorContext.getClassifiedErrors().iterator().next() != "ReselectFlow")
|
6 |
|
|
## This handles errors that are classified by the message maps in the authentication config.
|
7 |
|
|
#set ($eventId = $authenticationErrorContext.getClassifiedErrors().iterator().next())
|
8 |
|
|
#set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "login"))
|
9 |
|
|
#set ($message = $springMacroRequestContext.getMessage("${eventKey}.message", "Login Failure: $eventId"))
|
10 |
|
|
#elseif ($authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0)
|
11 |
|
|
## This handles login exceptions that are left unclassified.
|
12 |
|
|
#set ($loginException = $authenticationErrorContext.getExceptions().get(0))
|
13 |
|
|
#if ($loginException.getMessage())
|
14 |
|
|
#set ($message = "Login Failure: $loginException.getMessage()")
|
15 |
|
|
#else
|
16 |
|
|
#set ($message = $loginException.toString())
|
17 |
|
|
#end
|
18 |
|
|
#end
|
19 |
|
|
|
20 |
|
|
#if ($message)
|
21 |
|
|
<section>
|
22 |
49775
|
tsampikos.
|
<p class="form-element form-error uk-text-danger">$encoder.encodeForHTML($message)</p>
|
23 |
49495
|
tsampikos.
|
</section>
|
24 |
|
|
#end
|