[java-identity-provider] branch main updated: IDP-2049 - Auth validator error handling should classify default event
Scott Cantor
cantor.2 at osu.edu
Wed Dec 7 17:27:29 UTC 2022
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=e6f04da398dd11efb68aa60f9246d266af97137d
The following commit(s) were added to refs/heads/main by this push:
new e6f04da39 IDP-2049 - Auth validator error handling should classify default event
e6f04da39 is described below
commit e6f04da398dd11efb68aa60f9246d266af97137d
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 0c4047036..951a9d71b 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
@@ -548,6 +548,8 @@ public abstract class AbstractValidationAction extends AbstractAuthenticationAct
}
if (!eventSet) {
+ authenticationContext.getSubcontext(AuthenticationErrorContext.class,
+ true).getClassifiedErrors().add(eventId);
ActionSupport.buildEvent(profileRequestContext, eventId);
}
}
@@ -589,6 +591,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