Package org.apache.directory.api.ldap.model.message

Examples of org.apache.directory.api.ldap.model.message.BindRequestImpl.addControl()


        assertNull( respCtrl );

        BindRequest bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( "1234" ); // wrong password
        bindReq.addControl( PP_REQ_CTRL );
       
        LdapConnection userConnection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );

        for( int i=0; i< 3; i++ )
        {
View Full Code Here


        assertEquals( "000001010000Z", pwdAccountLockedTime.getString() );
       
        bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( "12345" ); // correct password
        bindReq.addControl( PP_REQ_CTRL );
        userConnection.bind( bindReq );
        assertFalse( userConnection.isAuthenticated() ); // but still fails cause account is locked
       
        userConnection.close();
       
View Full Code Here

        connection.add( addRequest );

        BindRequest bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( password.getBytes() );
        bindReq.addControl( PP_REQ_CTRL );
       
        LdapConnection userCon= new LdapNetworkConnection( "localhost", ldapServer.getPort() );
        userCon.setTimeOut(0);

        Thread.sleep( 1000 ); // sleep for one second so that the password expire warning will be sent
View Full Code Here

        assertNull( respCtrl );

        BindRequest bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( "12345" ); // grace login
        bindReq.addControl( PP_REQ_CTRL );
       
        LdapConnection userConnection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );

        Thread.sleep( 2000 ); // let the password expire
        BindResponse bindResp = userConnection.bind( bindReq );
View Full Code Here

        assertNull( respCtrl );

        BindRequest bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( "1234" ); // wrong password
        bindReq.addControl( PP_REQ_CTRL );
       
        LdapConnection userConnection = new LdapNetworkConnection( "localhost", ldapServer.getPort() );

        for( int i=0; i< 4; i++ )
        {
View Full Code Here

       
        Thread.sleep( 10000 );
        bindReq = new BindRequestImpl();
        bindReq.setDn( userDn );
        bindReq.setCredentials( "12345" ); // correct password
        bindReq.addControl( PP_REQ_CTRL );
        userConnection.setTimeOut( Long.MAX_VALUE );
        userConnection.bind( bindReq );
        assertTrue( userConnection.isAuthenticated() );
       
        userConnection.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.