Examples of BindResponse


Examples of org.apache.directory.api.ldap.model.message.BindResponse

        bindReq.setCredentials( "12345" );
        bindReq.addControl( PP_REQ_CTRL );

        for ( int i = 0; i < 5; i++ )
        {
            BindResponse bindResponse = userConnection.bind( bindReq );
            assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode() );

            PasswordPolicy respCtrl = getPwdRespCtrl( bindResponse );
            assertNotNull( respCtrl );

            if ( i < 2 )
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

            BindRequest bindReq = new BindRequestImpl();
            bindReq.setDn( userDn );
            bindReq.setCredentials( "12345" );
            bindReq.addControl( PP_REQ_CTRL );
            BindResponse bindResponse = userConnection2.bind( bindReq );
            PasswordPolicy respCtrl = getPwdRespCtrl( bindResponse );
            assertNotNull( respCtrl );
            assertNull( respCtrl.getResponse() );

            // now modify change time
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

       BindRequest bindRequest = new BindRequestImpl();
       bindRequest.setDn( userDn );
       bindRequest.setCredentials( "12345" );
       bindRequest.addControl( PP_REQ_CTRL );
       // successful bind but must require pwd reset as was set by admin
       BindResponse bindResponse = userConnection.bind( bindRequest );
       assertEquals( ResultCodeEnum.SUCCESS, bindResponse.getLdapResult().getResultCode() );
       assertEquals( PasswordPolicyErrorEnum.CHANGE_AFTER_RESET,
           getPwdRespCtrl( bindResponse ).getResponse().getPasswordPolicyError() );

       ModifyRequest modifyRequest = new ModifyRequestImpl();
       modifyRequest.setName( userDn );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        LOG.debug( "Bind request" );

        // Create the BindRequest
        BindRequest bindRequest = createBindRequest( config.getName(), Strings.getBytesUtf8( config.getCredentials() ) );

        BindResponse bindResponse = bind( bindRequest );

        processResponse( bindResponse );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        LOG.debug( "Anonymous Bind request" );

        // Create the BindRequest
        BindRequest bindRequest = createBindRequest( StringConstants.EMPTY, StringConstants.EMPTY_BYTES );

        BindResponse bindResponse = bind( bindRequest );

        processResponse( bindResponse );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        // Get the result from the future
        try
        {
            // Read the response, waiting for it if not available immediately
            // Get the response, blocking
            BindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );

            if ( bindResponse == null )
            {
                // We didn't received anything : this is an error
                LOG.error( "Bind failed : timeout occurred" );
                throw new LdapException( TIME_OUT_ERROR );
            }

            if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
            {
                authenticated.set( true );

                // Everything is fine, return the response
                LOG.debug( "Bind successful : {}", bindResponse );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        // Get the result from the future
        try
        {
            // Read the response, waiting for it if not available immediately
            // Get the response, blocking
            BindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );

            if ( bindResponse == null )
            {
                // We didn't received anything : this is an error
                LOG.error( "Bind failed : timeout occurred" );
                throw new LdapException( TIME_OUT_ERROR );
            }

            if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
            {
                authenticated.set( true );

                // Everything is fine, return the response
                LOG.debug( "Bind successful : {}", bindResponse );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        // Get the result from the future
        try
        {
            // Read the response, waiting for it if not available immediately
            // Get the response, blocking
            BindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );

            if ( bindResponse == null )
            {
                // We didn't received anything : this is an error
                LOG.error( "Bind failed : timeout occurred" );
                throw new LdapException( TIME_OUT_ERROR );
            }

            if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
            {
                authenticated.set( true );

                // Everything is fine, return the response
                LOG.debug( "Bind successful : {}", bindResponse );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

        // Get the result from the future
        try
        {
            // Read the response, waiting for it if not available immediately
            // Get the response, blocking
            BindResponse bindResponse = bindFuture.get( timeout, TimeUnit.MILLISECONDS );

            if ( bindResponse == null )
            {
                // We didn't received anything : this is an error
                LOG.error( "Bind failed : timeout occurred" );
                throw new LdapException( TIME_OUT_ERROR );
            }

            if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
            {
                authenticated.set( true );

                // Everything is fine, return the response
                LOG.debug( "Bind successful : {}", bindResponse );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.message.BindResponse

                break;

            case BIND_RESPONSE:
                // Transform the response
                BindResponse bindResponse = ( BindResponse ) response;

                BindFuture bindFuture = ( BindFuture ) responseFuture;

                // remove the listener from the listener map
                if ( bindResponse.getLdapResult().getResultCode() == ResultCodeEnum.SUCCESS )
                {
                    authenticated.set( true );

                    // Everything is fine, return the response
                    LOG.debug( "Bind successful : {}", bindResponse );
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.