[java-identity-provider COMMIT] in /trunk: idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java id...

noreply at shibboleth.net noreply at shibboleth.net
Wed Oct 23 23:07:19 EDT 2013


Author: dfisher
Date: Wed Oct 23 23:07:19 2013
New Revision: 4901

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4901&view=rev
Log:
Add implementation for LDAP username password validation using ldaptive.
See IDP-113.

Added:
    trunk/idp-authn-impl/src/test/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAPTest.java
Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
    trunk/idp-authn-impl/pom.xml
    trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java?rev=4901&r1=4900&r2=4901&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AuthnEventIds.java Wed Oct 23 23:07:19 2013
@@ -32,9 +32,9 @@
     /** ID of event returned if there are no credentials available in the request. */
     public static final String NO_CREDENTIALS = "NoCredentials";
 
-    /** ID of event returned if there given credentials are invalid. */
+    /** ID of event returned if the given credentials are invalid. */
     public static final String INVALID_CREDENTIALS = "InvalidCredentials";
-    
+
     /** ID of event returned if a Subject cannot be canonicalized. */
     public static final String SUBJECT_C14N_ERROR = "SubjectCanonicalizationError";
     

Modified: trunk/idp-authn-impl/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/pom.xml?rev=4901&r1=4900&r2=4901&view=diff
==============================================================================
--- trunk/idp-authn-impl/pom.xml (original)
+++ trunk/idp-authn-impl/pom.xml Wed Oct 23 23:07:19 2013
@@ -66,6 +66,10 @@
             <groupId>org.owasp.esapi</groupId>
             <artifactId>esapi</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.ldaptive</groupId>
+            <artifactId>ldaptive</artifactId>
+        </dependency>
 
         <!-- Provided Dependencies -->
 
@@ -93,11 +97,6 @@
             <artifactId>unboundid-ldapsdk</artifactId>
             <scope>test</scope>
         </dependency>
-        <dependency>  <!-- Needed, even tho maven thinks not -->
-            <groupId>org.ldaptive</groupId>
-            <artifactId>ldaptive</artifactId>
-            <scope>test</scope>
-        </dependency>
         
     </dependencies>
     

Modified: trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java?rev=4901&r1=4900&r2=4901&view=diff
==============================================================================
--- trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java (original)
+++ trunk/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateUsernamePasswordAgainstLDAP.java Wed Oct 23 23:07:19 2013
@@ -27,17 +27,27 @@
 import net.shibboleth.idp.authn.UsernamePrincipal;
 import net.shibboleth.idp.authn.context.AuthenticationContext;
 import net.shibboleth.idp.authn.context.UsernamePasswordContext;
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
+import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
+import net.shibboleth.utilities.java.support.logic.Constraint;
 
+import org.ldaptive.Credential;
+import org.ldaptive.LdapException;
+import org.ldaptive.auth.AuthenticationRequest;
+import org.ldaptive.auth.AuthenticationResponse;
+import org.ldaptive.auth.Authenticator;
 import org.opensaml.profile.action.ActionSupport;
 import org.opensaml.profile.action.EventIds;
+import org.opensaml.profile.context.EventContext;
 import org.opensaml.profile.context.ProfileRequestContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * An action that checks for a {@link UsernamePasswordContext} and directly produces an
- * {@link net.shibboleth.idp.authn.AuthenticationResult} based on that identity by binding to LDAP.
- *  
+ * {@link net.shibboleth.idp.authn.AuthenticationResult} based on that identity by authenticating against an LDAP.
+ * 
  * @event {@link EventIds#PROCEED_EVENT_ID}
  * @event {@link EventIds#INVALID_PROFILE_CTX}
  * @event {@link AuthnEventIds#INVALID_CREDENTIALS}
@@ -50,12 +60,41 @@
  */
 public class ValidateUsernamePasswordAgainstLDAP extends AbstractValidationAction {
 
-
     /** Class logger. */
-    private final Logger log = LoggerFactory.getLogger(ValidateUsernamePasswordAgainstKerberos.class);

[... 89 lines stripped ...]


More information about the commits mailing list