Package org.apache.directory.ldap.client.api

Examples of org.apache.directory.ldap.client.api.LdapNetworkConnection.connect()


    public void testFailsStartTLSWhenSSLIsInUse() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        tlsConfig.setUseSsl( true );
        tlsConfig.setLdapPort( ldapServer.getPortSSL() );
        connection.connect();
        connection.startTls();
    }


    @Test(expected = InvalidConnectionException.class)
View Full Code Here


        LdapNetworkConnection connection = null;
        try
        {
            connection = new LdapNetworkConnection( tlsConfig );
            tlsConfig.setUseTls( true );
            connection.connect();
            connection.bind( "uid=admin,ou=system", "secret" );

            assertTrue( connection.isAuthenticated() );

            connection.unBind();
View Full Code Here

    @Test
    public void testGetSupportedControlsWithStartTLS() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        tlsConfig.setUseTls( true );
        connection.connect();

        Dn dn = new Dn( "uid=admin,ou=system" );
        connection.bind( dn.getName(), "secret" );

        List<String> controlList = connection.getSupportedControls();
View Full Code Here

    public void testFailsStartTLSWhenSSLIsInUse() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        tlsConfig.setUseSsl( true );
        tlsConfig.setLdapPort( ldapServer.getPortSSL() );
        connection.connect();
        connection.startTls();
    }


    @Test(expected = InvalidConnectionException.class)
View Full Code Here

    {
        LdapNetworkConnection connection = null;
        try
        {
            connection = new LdapNetworkConnection( tlsConfig );
            connection.connect();
            connection.startTls();
            connection.bind( "uid=admin,ou=system", "secret" );

            assertTrue( connection.isAuthenticated() );
View Full Code Here

    @Test
    public void testGetSupportedControlsWithStartTLS() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        connection.connect();
        connection.startTls();

        Dn dn = new Dn( "uid=admin,ou=system" );
        connection.bind( dn.getName(), "secret" );
View Full Code Here

    public void testFailsStartTLSWhenSSLIsInUse() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        tlsConfig.setUseSsl( true );
        tlsConfig.setLdapPort( ldapServer.getPortSSL() );
        connection.connect();
        connection.startTls();
    }


    @Test(expected = InvalidConnectionException.class)
View Full Code Here

            {
                useSsl = true;
            }
           
            LdapNetworkConnection c = new LdapNetworkConnection( url.getHost(), url.getPort(), useSsl );
            c.connect();
            c.bind( ServerDNConstants.ADMIN_SYSTEM_DN, "secret" );
            System.out.println( "connected to the server " + url );
            connections.add( c );
        }
    }
View Full Code Here

    {
        LdapNetworkConnection connection = null;
        try
        {
            connection = new LdapNetworkConnection( tlsConfig );
            connection.connect();
            connection.startTls();
            connection.bind( "uid=admin,ou=system", "secret" );

            assertTrue( connection.isAuthenticated() );
View Full Code Here

    @Test
    public void testGetSupportedControlsWithStartTLS() throws Exception
    {
        LdapNetworkConnection connection = new LdapNetworkConnection( tlsConfig );
        connection.connect();
        connection.startTls();

        Dn dn = new Dn( "uid=admin,ou=system" );
        connection.bind( dn.getName(), "secret" );
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.