[java-identity-provider COMMIT] in /trunk: idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsername...

noreply at shibboleth.net noreply at shibboleth.net
Fri Jul 11 11:08:56 EDT 2014


Author: scantor
Date: Fri Jul 11 11:08:56 2014
New Revision: 6281

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6281&view=rev
Log:
IDP-439: fix regression in flow, and clear UP ctx every time

Modified:
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuth.java
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java
    trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuth.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuth.java?rev=6281&r1=6280&r2=6281&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuth.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromBasicAuth.java Fri Jul 11 11:08:56 2014
@@ -64,6 +64,10 @@
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) {
 
+        final UsernamePasswordContext upCtx = authenticationContext.getSubcontext(UsernamePasswordContext.class, true);
+        upCtx.setUsername(null);
+        upCtx.setPassword(null);
+        
         final HttpServletRequest request = getHttpServletRequest();
         if (request == null) {
             log.debug("{} Profile action does not contain an HttpServletRequest", getLogPrefix());
@@ -83,8 +87,7 @@
             return;
         }
         
-        authenticationContext.getSubcontext(UsernamePasswordContext.class, true).setUsername(
-                applyTransforms(decodedCredentials.getFirst())).setPassword(decodedCredentials.getSecond());
+        upCtx.setUsername(applyTransforms(decodedCredentials.getFirst())).setPassword(decodedCredentials.getSecond());
     }
 
     /**

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java?rev=6281&r1=6280&r2=6281&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ExtractUsernamePasswordFromFormRequest.java Fri Jul 11 11:08:56 2014
@@ -106,14 +106,16 @@
     protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
             @Nonnull final AuthenticationContext authenticationContext) {
 
+        final UsernamePasswordContext upCtx = authenticationContext.getSubcontext(UsernamePasswordContext.class, true);
+        upCtx.setUsername(null);
+        upCtx.setPassword(null);
+        
         final HttpServletRequest request = getHttpServletRequest();
         if (request == null) {
             log.debug("{} Profile action does not contain an HttpServletRequest", getLogPrefix());
             ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.NO_CREDENTIALS);
             return;
         }
-        
-        final UsernamePasswordContext upCtx = authenticationContext.getSubcontext(UsernamePasswordContext.class, true);
         
         final String username = request.getParameter(usernameFieldName);
         if (username == null || username.isEmpty()) {

Modified: trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml?rev=6281&r1=6280&r2=6281&view=diff
==============================================================================
--- trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml (original)
+++ trunk/idp-conf/src/main/resources/system/flows/authn/password-authn-flow.xml Fri Jul 11 11:08:56 2014
@@ -37,6 +37,7 @@
     
     <action-state id="ExtractUsernamePasswordFromFormRequest">
         <evaluate expression="ExtractUsernamePasswordFromFormRequest" />
+        <evaluate expression="'proceed'" />
     
         <!-- Let the validate action handle any problems later. -->        
         <transition to="ValidateUsernamePassword" />



More information about the commits mailing list