Examples of BindResponseImpl


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

        bindContext.setDn( bindRequest.getDn().apply( directoryService.getSchemaManager() ) );
        bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );

        OperationManager operationManager = directoryService.getOperationManager();

        BindResponse bindResp = new BindResponseImpl( newId );
        bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );

        try
        {
            if ( !bindRequest.isSimple() )
            {
                bindContext.setSaslMechanism( bindRequest.getSaslMechanism() );
            }

            operationManager.bind( bindContext );
            session = bindContext.getSession();

            bindResp.addAllControls( bindContext.getResponseControls() );
        }
        catch ( LdapOperationException e )
        {
            LOG.warn( e.getMessage(), e );
            LdapResult res = bindResp.getLdapResult();
            res.setDiagnosticMessage( e.getMessage() );
            res.setResultCode( e.getResultCode() );
        }

        return bindResp;
View Full Code Here

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

            // SASL BindRequest
            if ( !( message instanceof BindRequest ) || ( ( BindRequest ) message ).isSimple()
                || ldapSession.isSimpleAuthPending() )
            {
                LOG.error( I18n.err( I18n.ERR_732 ) );
                BindResponse bindResponse = new BindResponseImpl( message.getMessageId() );
                LdapResult bindResult = bindResponse.getLdapResult();
                bindResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
                bindResult.setDiagnosticMessage( I18n.err( I18n.ERR_732 ) );
                ldapSession.getIoSession().write( bindResponse );
                return;
            }
View Full Code Here

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

        bindContext.setDn( bindRequest.getDn().apply( directoryService.getSchemaManager() ) );
        bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );

        OperationManager operationManager = directoryService.getOperationManager();

        BindResponse bindResp = new BindResponseImpl( newId );
        bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );

        try
        {
            if ( !bindRequest.isSimple() )
            {
                bindContext.setSaslMechanism( bindRequest.getSaslMechanism() );
            }

            operationManager.bind( bindContext );
            session = bindContext.getSession();

            bindResp.addAllControls( bindContext.getResponseControls() );
        }
        catch ( LdapOperationException e )
        {
            LOG.warn( e.getMessage(), e );
            LdapResult res = bindResp.getLdapResult();
            res.setDiagnosticMessage( e.getMessage() );
            res.setResultCode( e.getResultCode() );
        }

        return bindResp;
View Full Code Here

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

            // SASL BindRequest
            if ( !( message instanceof BindRequest ) || ( ( BindRequest ) message ).isSimple()
                || ldapSession.isSimpleAuthPending() )
            {
                LOG.error( I18n.err( I18n.ERR_732 ) );
                BindResponse bindResponse = new BindResponseImpl( message.getMessageId() );
                LdapResult bindResult = bindResponse.getLdapResult();
                bindResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );
                bindResult.setDiagnosticMessage( I18n.err( I18n.ERR_732 ) );
                ldapSession.getIoSession().write( bindResponse );
                return;
            }
View Full Code Here

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

        bindContext.setDn( bindRequest.getDn().apply( directoryService.getSchemaManager() ) );
        bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );

        OperationManager operationManager = directoryService.getOperationManager();

        BindResponse bindResp = new BindResponseImpl( newId );
        bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );

        try
        {
            if ( !bindRequest.isSimple() )
            {
                bindContext.setSaslMechanism( bindRequest.getSaslMechanism() );
            }

            operationManager.bind( bindContext );
            session = bindContext.getSession();

            bindResp.addAllControls( bindContext.getResponseControls() );
        }
        catch ( LdapOperationException e )
        {
            LOG.warn( e.getMessage(), e );
            LdapResult res = bindResp.getLdapResult();
            res.setDiagnosticMessage( e.getMessage() );
            res.setResultCode( e.getResultCode() );
        }

        return bindResp;
View Full Code Here

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

        bindContext.setDn( bindRequest.getDn() );
        bindContext.setInterceptors( directoryService.getInterceptors( OperationEnum.BIND ) );

        OperationManager operationManager = directoryService.getOperationManager();

        BindResponse bindResp = new BindResponseImpl( newId );
        bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );

        try
        {
            if ( !bindRequest.isSimple() )
            {
                bindContext.setSaslMechanism( bindRequest.getSaslMechanism() );
            }

            operationManager.bind( bindContext );
            session = bindContext.getSession();

            bindResp.addAllControls( bindContext.getResponseControls() );
        }
        catch ( LdapOperationException e )
        {
            LOG.warn( e.getMessage(), e );
            LdapResult res = bindResp.getLdapResult();
            res.setDiagnosticMessage( e.getMessage() );
            res.setResultCode( e.getResultCode() );
        }

        return bindResp;
View Full Code Here

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

            holder = new BindResponseHolder( resp, connection );
        }
        catch ( Exception e )
        {
            resp = new BindResponseImpl();

            LdapResult result = resp.getLdapResult();
            result.setDiagnosticMessage( e.getMessage() );
            result.setResultCode( ResultCodeEnum.getResultCode( e ) );
View Full Code Here

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

            {
                String msg = "Incorrect DN given : " + nameStr + " (" + Strings.dumpBytes( nameBytes )
                    + ") is invalid";
                LOG.error( "{} : {}", msg, ine.getMessage() );

                BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() );

                throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_DN_SYNTAX,
                    Dn.EMPTY_DN, ine );
            }
        }
View Full Code Here

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

        if ( tlv.getLength() == 0 )
        {
            String msg = I18n.err( I18n.ERR_04079 );
            LOG.error( msg );

            BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() );

            throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS,
                bindRequestMessage.getDn(), null );
        }
View Full Code Here

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

    /**
     * Creates a new getDecoratedMessage() of AuthResponseDsml.
     */
    public BindResponseDsml( LdapApiService codec )
    {
        super( codec, new BindResponseImpl() );
    }
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.