[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAct...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jul 10 22:02:42 EDT 2014
Author: scantor
Date: Thu Jul 10 22:02:41 2014
New Revision: 6272
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6272&view=rev
Log:
IDP-439: redesign the way validators handle missing user/pass data to unify signaling to form
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateExternalAuthentication.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateRemoteUser.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUserAgentAddress.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstJAAS.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstKerberos.java
trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java
trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAPTest.java
trunk/idp-conf/src/main/resources/conf/authn/password-authn-config.xml
trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml
trunk/idp-conf/src/main/resources/views/login.vm
trunk/idp-war/src/main/webapp/WEB-INF/jsp/login.jsp
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java?rev=6272&r1=6271&r2=6272&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java Thu Jul 10 22:02:41 2014
@@ -214,6 +214,10 @@
protected boolean doPreExecute(
@Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext,
@Nonnull final AuthenticationContext authenticationContext) {
+
+ if (clearErrorContext) {
+ authenticationContext.removeSubcontext(AuthenticationErrorContext.class);
+ }
// If the request mandates particular principals, evaluate this validating component to see if it
// can produce a matching principal. This skips validators chained together in flows that aren't
@@ -248,10 +252,6 @@
return false;
}
- if (clearErrorContext) {
- authenticationContext.removeSubcontext(AuthenticationErrorContext.class);
- }
-
return super.doPreExecute(profileRequestContext, authenticationContext);
}
@@ -354,16 +354,14 @@
@Nonnull final AuthenticationContext authenticationContext, @Nonnull @NotEmpty final String message,
@Nonnull @NotEmpty final String eventId) {
- final AuthenticationErrorContext errorCtx =
- authenticationContext.getSubcontext(AuthenticationErrorContext.class, true);
-
final MessageChecker checker = new MessageChecker(message);
boolean eventSet = false;
for (final Map.Entry<String, Collection<String>> entry : classifiedMessages.entrySet()) {
if (Iterables.any(entry.getValue(), checker)) {
- errorCtx.getClassifiedErrors().add(entry.getKey());
+ authenticationContext.getSubcontext(AuthenticationErrorContext.class, true).getClassifiedErrors().add(
+ entry.getKey());
if (!eventSet) {
eventSet = true;
ActionSupport.buildEvent(profileRequestContext, entry.getKey());
@@ -396,16 +394,14 @@
@Nonnull final AuthenticationContext authenticationContext, @Nonnull @NotEmpty final String message,
@Nonnull @NotEmpty final String eventId) {
- final AuthenticationWarningContext warningCtx =
- authenticationContext.getSubcontext(AuthenticationWarningContext.class, true);
-
final MessageChecker checker = new MessageChecker(message);
boolean eventSet = false;
for (Map.Entry<String, Collection<String>> entry : classifiedMessages.entrySet()) {
if (Iterables.any(entry.getValue(), checker)) {
- warningCtx.getClassifiedWarnings().add(entry.getKey());
+ authenticationContext.getSubcontext(AuthenticationWarningContext.class,
+ true).getClassifiedWarnings().add(entry.getKey());
if (!eventSet) {
eventSet = true;
ActionSupport.buildEvent(profileRequestContext, entry.getKey());
[... 470 lines stripped ...]
More information about the commits
mailing list