/** * Creates a new getDecoratedMessage() of AuthResponseDsml. * * @param codec The LDAP Service to use */ public BindResponseDsml( LdapApiService codec ) { super( codec, new BindResponseImpl() ); }
/** * Creates a new instance of NoticeOfDisconnect. * * @param rcode The {@link ResultCodeEnum} value to wrap */ private BindNoDResponse( ResultCodeEnum rcode ) { super(); switch ( rcode ) { case UNAVAILABLE: break; case PROTOCOL_ERROR: break; case STRONG_AUTH_REQUIRED: break; default: throw new IllegalArgumentException( I18n.err( I18n.ERR_13503_RESULT_CODE_SHOULD_BE_IN, ResultCodeEnum.UNAVAILABLE, ResultCodeEnum.PROTOCOL_ERROR, ResultCodeEnum.STRONG_AUTH_REQUIRED ) ); } super.getLdapResult().setDiagnosticMessage( rcode.toString() + ": The server will disconnect!" ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); }
/** * Creates a new instance of NoticeOfDisconnect. * * @param rcode The {@link ResultCodeEnum} value to wrap */ private BindNoDResponse( ResultCodeEnum rcode ) { super(); switch ( rcode ) { case UNAVAILABLE: break; case PROTOCOL_ERROR: break; case STRONG_AUTH_REQUIRED: break; default: throw new IllegalArgumentException( I18n.err( I18n.ERR_13503_RESULT_CODE_SHOULD_BE_IN, ResultCodeEnum.UNAVAILABLE, ResultCodeEnum.PROTOCOL_ERROR, ResultCodeEnum.STRONG_AUTH_REQUIRED ) ); } super.getLdapResult().setDiagnosticMessage( rcode.toString() + ": The server will disconnect!" ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); }
/** * The result containing response for this request. * * @return the result containing response for this request */ @Override public BindResponse getResultResponse() { if ( response == null ) { response = new BindResponseImpl( getMessageId() ); } return response; }
/** * Creates a new instance of NoticeOfDisconnect. * * @param rcode The {@link ResultCodeEnum} value to wrap */ private BindNoDResponse( ResultCodeEnum rcode ) { super(); switch ( rcode ) { case UNAVAILABLE: break; case PROTOCOL_ERROR: break; case STRONG_AUTH_REQUIRED: break; default: throw new IllegalArgumentException( I18n.err( I18n.ERR_13503_RESULT_CODE_SHOULD_BE_IN, ResultCodeEnum.UNAVAILABLE, ResultCodeEnum.PROTOCOL_ERROR, ResultCodeEnum.STRONG_AUTH_REQUIRED ) ); } super.getLdapResult().setDiagnosticMessage( rcode.toString() + ": The server will disconnect!" ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); }
/** * The result containing response for this request. * * @return the result containing response for this request */ @Override public BindResponse getResultResponse() { if ( response == null ) { response = new BindResponseImpl( getMessageId() ); } return response; }
/** * The result containing response for this request. * * @return the result containing response for this request */ @Override public BindResponse getResultResponse() { if ( response == null ) { response = new BindResponseImpl( getMessageId() ); } return response; }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<BindResponseDecorator> container ) { // Now, we can allocate the BindResponse Object BindResponseDecorator bindResponse = new BindResponseDecorator( container.getLdapCodecService(), new BindResponseImpl( container.getMessageId() ) ); container.setMessage( bindResponse ); } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<BindResponseDecorator> container ) { // Now, we can allocate the BindResponse Object BindResponseDecorator bindResponse = new BindResponseDecorator( container.getLdapCodecService(), new BindResponseImpl( container.getMessageId() ) ); container.setMessage( bindResponse ); } }
/** * {@inheritDoc} */ public void action( LdapMessageContainer<BindResponseDecorator> container ) { // Now, we can allocate the BindResponse Object BindResponseDecorator bindResponse = new BindResponseDecorator( container.getLdapCodecService(), new BindResponseImpl( container.getMessageId() ) ); container.setMessage( bindResponse ); } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { BindRequest bindRequestMessage = container.getMessage(); TLV tlv = container.getCurrentTLV(); // We will check that the sasl is not null if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05116_SASL_CREDS_CANT_BE_NULL ); LOG.error( msg ); BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, bindRequestMessage.getDn(), null ); } bindRequestMessage.setSimple( false ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05115_SASL_CREDS_CREATED ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { BindRequest bindRequestMessage = container.getMessage(); TLV tlv = container.getCurrentTLV(); // We will check that the sasl is not null if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05116_SASL_CREDS_CANT_BE_NULL ); LOG.error( msg ); BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, bindRequestMessage.getDn(), null ); } bindRequestMessage.setSimple( false ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05115_SASL_CREDS_CREATED ) ); } } }
/** * {@inheritDoc} */ @Override public void action( LdapMessageContainer<BindRequestDecorator> container ) throws DecoderException { BindRequest bindRequestMessage = container.getMessage(); TLV tlv = container.getCurrentTLV(); // We will check that the sasl is not null if ( tlv.getLength() == 0 ) { String msg = I18n.err( I18n.ERR_05116_SASL_CREDS_CANT_BE_NULL ); LOG.error( msg ); BindResponseImpl response = new BindResponseImpl( bindRequestMessage.getMessageId() ); throw new ResponseCarryingException( msg, response, ResultCodeEnum.INVALID_CREDENTIALS, bindRequestMessage.getDn(), null ); } bindRequestMessage.setSimple( false ); if ( LOG.isDebugEnabled() ) { LOG.debug( I18n.msg( I18n.MSG_05115_SASL_CREDS_CREATED ) ); } } }
container.getLdapCodecService(), new BindResponseImpl() ); container.getBatchResponse().addResponse( bindResponse );
BindResponse bindResp = new BindResponseImpl( newId ); bindResp.getLdapResult().setResultCode( ResultCodeEnum.SUCCESS );
BindResponse bindResponse = new BindResponseImpl( message.getMessageId() ); LdapResult bindResult = bindResponse.getLdapResult(); bindResult.setResultCode( ResultCodeEnum.UNWILLING_TO_PERFORM );