[java-identity-provider] branch maint-4 updated: IDP-2049 - Auth validator error handling should classify default event
Scott Cantor
cantor.2 at osu.edu
Wed Dec 7 17:24:57 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch maint-4
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=8f46219e801622027c98b48dc93f1b32d25ff664
The following commit(s) were added to refs/heads/maint-4 by this push:
new 8f46219e8 IDP-2049 - Auth validator error handling should classify default event
8f46219e8 is described below
commit 8f46219e801622027c98b48dc93f1b32d25ff664
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Dec 7 12:24:54 2022 -0500
IDP-2049 - Auth validator error handling should classify default event
https://shibboleth.atlassian.net/browse/IDP-2049
---
.../main/java/net/shibboleth/idp/authn/AbstractValidationAction.java | 4 ++++
.../src/main/resources/net/shibboleth/idp/module/views/login-error.vm | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
index fe5bcc392..49224061e 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
@@ -557,6 +557,8 @@ public abstract class AbstractValidationAction extends AbstractAuthenticationAct
}
if (!eventSet) {
+ authenticationContext.getSubcontext(AuthenticationErrorContext.class,
+ true).getClassifiedErrors().add(eventId);
ActionSupport.buildEvent(profileRequestContext, eventId);
}
}
@@ -598,6 +600,8 @@ public abstract class AbstractValidationAction extends AbstractAuthenticationAct
}
if (!eventSet) {
+ authenticationContext.getSubcontext(AuthenticationWarningContext.class,
+ true).getClassifiedWarnings().add(eventId);
ActionSupport.buildEvent(profileRequestContext, eventId);
}
}
diff --git a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/login-error.vm b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/login-error.vm
index 2b083b5b0..4a9e6410f 100644
--- a/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/login-error.vm
+++ b/idp-conf-impl/src/main/resources/net/shibboleth/idp/module/views/login-error.vm
@@ -2,11 +2,11 @@
##
## authenticationErrorContext - context containing error data, if available
##
-#if ($authenticationErrorContext && $authenticationErrorContext.getClassifiedErrors().size() > 0)
+#if ($authenticationErrorContext && $authenticationErrorContext.getClassifiedErrors().size() > 0 && !$authenticationErrorContext.getClassifiedErrors().contains('AuthenticationException'))
## This handles errors that are classified by the message maps in the authentication config.
#set ($eventId = $authenticationErrorContext.getClassifiedErrors().iterator().next())
#if ($eventId != "ReselectFlow")
- #set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "login"))
+ #set ($eventKey = $springMacroRequestContext.getMessage("$eventId", "authn"))
#set ($message = $springMacroRequestContext.getMessage("${eventKey}.message", "Login Failure: $eventId"))
#end
#elseif ($authenticationErrorContext && $authenticationErrorContext.getExceptions().size() > 0)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list