From commits-return-33403-apmail-directory-commits-archive=directory.apache.org@directory.apache.org Tue Jan 24 15:32:56 2012 Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26D359A0A for ; Tue, 24 Jan 2012 15:32:56 +0000 (UTC) Received: (qmail 32611 invoked by uid 500); 24 Jan 2012 15:32:56 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 32579 invoked by uid 500); 24 Jan 2012 15:32:55 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 32568 invoked by uid 99); 24 Jan 2012 15:32:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 15:32:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jan 2012 15:32:52 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 21A032388A39 for ; Tue, 24 Jan 2012 15:32:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1235300 [2/2] - in /directory/apacheds/trunk: installers-maven-plugin/src/main/java/org/apache/directory/server/installers/ installers-maven-plugin/src/main/java/org/apache/directory/server/installers/archive/ installers-maven-plugin/src/m... Date: Tue, 24 Jan 2012 15:32:29 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120124153231.21A032388A39@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/StrongAuthenticator.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/StrongAuthenticator.java?rev=1235300&r1=1235299&r2=1235300&view=diff ============================================================================== --- directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/StrongAuthenticator.java (original) +++ directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/StrongAuthenticator.java Tue Jan 24 15:32:28 2012 @@ -55,10 +55,11 @@ public class StrongAuthenticator extends public LdapPrincipal authenticate( BindOperationContext bindContext ) throws LdapAuthenticationException { // Possibly check if user account is disabled, other account checks. - LdapPrincipal principal = new LdapPrincipal( getDirectoryService().getSchemaManager(), bindContext.getDn(), AuthenticationLevel.STRONG ); - + LdapPrincipal principal = new LdapPrincipal( getDirectoryService().getSchemaManager(), bindContext.getDn(), + AuthenticationLevel.STRONG ); + IoSession session = bindContext.getIoSession(); - + if ( session != null ) { SocketAddress clientAddress = session.getRemoteAddress(); @@ -66,7 +67,7 @@ public class StrongAuthenticator extends SocketAddress serverAddress = session.getServiceAddress(); principal.setServerAddress( serverAddress ); } - + return principal; } } Modified: directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/ppolicy/PpolicyConfigContainer.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/ppolicy/PpolicyConfigContainer.java?rev=1235300&r1=1235299&r2=1235300&view=diff ============================================================================== --- directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/ppolicy/PpolicyConfigContainer.java (original) +++ directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/ppolicy/PpolicyConfigContainer.java Tue Jan 24 15:32:28 2012 @@ -67,8 +67,8 @@ public class PpolicyConfigContainer { return ( !ppolicyConfigMap.isEmpty() ); } - - + + /** * Get the password policy configuration defined at a given Dn * @@ -100,7 +100,7 @@ public class PpolicyConfigContainer this.defaultPolicy = defaultPolicy; } - + /** * deactivate an existing password policy. * Modified: directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/LdapPrincipalTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/LdapPrincipalTest.java?rev=1235300&r1=1235299&r2=1235300&view=diff ============================================================================== --- directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/LdapPrincipalTest.java (original) +++ directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/LdapPrincipalTest.java Tue Jan 24 15:32:28 2012 @@ -19,6 +19,7 @@ */ package org.apache.directory.server.core.authn; + import static org.junit.Assert.assertEquals; import java.io.ByteArrayInputStream; @@ -53,6 +54,7 @@ public class LdapPrincipalTest /** The schema manager instance */ private static SchemaManager schemaManager; + @BeforeClass public static void setUp() throws Exception { @@ -81,15 +83,16 @@ public class LdapPrincipalTest assertEquals( principal.getAuthenticationLevel(), readPrincipal.getAuthenticationLevel() ); assertEquals( principal.getName(), readPrincipal.getName() ); } - - + + /** * Test the serialization of an empty LdapPrincipal */ @Test public void testStaticSerializeLdapPrincipalWithSchemaManager() throws Exception { - LdapPrincipal principal = new LdapPrincipal( schemaManager, new Dn( schemaManager, "uid=admin,ou=system" ), AuthenticationLevel.STRONG ); + LdapPrincipal principal = new LdapPrincipal( schemaManager, new Dn( schemaManager, "uid=admin,ou=system" ), + AuthenticationLevel.STRONG ); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream( baos ); Modified: directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java?rev=1235300&r1=1235299&r2=1235300&view=diff ============================================================================== --- directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java (original) +++ directory/apacheds/trunk/interceptors/authn/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticatorOneWayEncryptedTest.java Tue Jan 24 15:32:28 2012 @@ -55,15 +55,15 @@ public class SimpleAuthenticatorOneWayEn public void testGetAlgorithmForHashedPassword() { String digestetValue = "{SHA}LhkDrSoM6qr0fW6hzlfOJQW61tc="; - assertEquals( "SHA", auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(digestetValue) ) ); + assertEquals( "SHA", auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8( digestetValue ) ) ); assertEquals( "SHA", auth.getAlgorithmForHashedPassword( digestetValue.getBytes() ) ); String noAlgorithm = "Secret1!"; - assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(noAlgorithm) ) ); + assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8( noAlgorithm ) ) ); assertEquals( null, auth.getAlgorithmForHashedPassword( noAlgorithm.getBytes() ) ); String unknownAlgorithm = "{XYZ}LhkDrSoM6qr0fW6hzlfOJQW61tc="; - assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8(unknownAlgorithm) ) ); + assertEquals( null, auth.getAlgorithmForHashedPassword( Strings.getBytesUtf8( unknownAlgorithm ) ) ); assertEquals( null, auth.getAlgorithmForHashedPassword( unknownAlgorithm.getBytes() ) ); } @@ -73,7 +73,7 @@ public class SimpleAuthenticatorOneWayEn { String pwd = "Secret1!"; String expected = "{SHA}znbJr3+tymFoQD4+Njh4ITtI7Cc="; - String digested = auth.createDigestedPassword( "SHA", Strings.getBytesUtf8(pwd) ); + String digested = auth.createDigestedPassword( "SHA", Strings.getBytesUtf8( pwd ) ); assertEquals( expected, digested ); }