/** * {@inheritDoc} */ @Override public void setDiagnosticMessage( String diagnosticMessage ) { decoratedLdapResult.setDiagnosticMessage( diagnosticMessage ); }
/** * {@inheritDoc} */ @Override public void setDiagnosticMessage( String diagnosticMessage ) { result.setDiagnosticMessage( diagnosticMessage ); }
/** * {@inheritDoc} */ @Override public void setDiagnosticMessage( String diagnosticMessage ) { decoratedLdapResult.setDiagnosticMessage( diagnosticMessage ); }
/** * {@inheritDoc} */ @Override public void setDiagnosticMessage( String diagnosticMessage ) { decoratedLdapResult.setDiagnosticMessage( diagnosticMessage ); }
/** * Instantiates a new graceful disconnect. * * @param timeOffline the offline time after disconnect, in minutes * @param delay the delay before disconnect, in seconds */ public GracefulDisconnectResponseImpl( int timeOffline, int delay ) { super( 0, EXTENSION_OID ); responseName = EXTENSION_OID; this.timeOffline = timeOffline; this.delay = delay; StringBuilder buf = new StringBuilder(); buf.append( "The server will disconnect and will be unavailable for " ).append( timeOffline ); buf.append( " minutes in " ).append( delay ).append( " seconds." ); ldapResult.setDiagnosticMessage( buf.toString() ); ldapResult.setMatchedDn( null ); ldapResult.setResultCode( ResultCodeEnum.UNAVAILABLE ); }
/** * Instantiates a new graceful disconnect. * * @param timeOffline the offline time after disconnect, in minutes * @param delay the delay before disconnect, in seconds */ public GracefulDisconnectResponseImpl( int timeOffline, int delay ) { super( 0, EXTENSION_OID ); responseName = EXTENSION_OID; this.timeOffline = timeOffline; this.delay = delay; StringBuilder buf = new StringBuilder(); buf.append( "The server will disconnect and will be unavailable for " ).append( timeOffline ); buf.append( " minutes in " ).append( delay ).append( " seconds." ); ldapResult.setDiagnosticMessage( buf.toString() ); ldapResult.setMatchedDn( null ); ldapResult.setResultCode( ResultCodeEnum.UNAVAILABLE ); }
public void rejectWithoutConfidentiality( IoSession session, ResultResponse resp ) { LdapResult result = resp.getLdapResult(); result.setResultCode( ResultCodeEnum.CONFIDENTIALITY_REQUIRED ); result.setDiagnosticMessage( "Confidentiality (TLS secured connection) is required." ); session.write( resp ); }
/** * Create a new instance for the StartTls response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public StartTlsResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the PwdModify response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public PasswordModifyResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the PwdModify response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public PasswordModifyResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the WhoAmI response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public WhoAmIResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the WhoAmI response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public WhoAmIResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the PwdModify response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public PasswordModifyResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the StartTls response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public StartTlsResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the WhoAmI response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public WhoAmIResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Create a new instance for the StartTls response * @param messageId The Message ID * @param rcode The result code * @param diagnosticMessage The diagnostic message */ public StartTlsResponseImpl( int messageId, ResultCodeEnum rcode, String diagnosticMessage ) { super( messageId, EXTENSION_OID ); super.getLdapResult().setMatchedDn( null ); super.getLdapResult().setResultCode( rcode ); super.getLdapResult().setDiagnosticMessage( diagnosticMessage ); }
/** * Creates a DecoderException * * @param message A message with meaning to a human * @param response The response to store * @param code the ResultCode * @param matchedDn The Matched DN * @param cause The Exception which caused the error */ public ResponseCarryingException( String message, ResultResponse response, ResultCodeEnum code, Dn matchedDn, Throwable cause ) { super( message, cause ); response.getLdapResult().setDiagnosticMessage( message ); response.getLdapResult().setResultCode( code ); response.getLdapResult().setMatchedDn( matchedDn ); this.response = response; }
/** * Creates a DecoderException * * @param message A message with meaning to a human * @param response The response to store * @param code the ResultCode * @param matchedDn The Matched DN * @param cause The Exception which caused the error */ public ResponseCarryingException( String message, ResultResponse response, ResultCodeEnum code, Dn matchedDn, Throwable cause ) { super( message, cause ); response.getLdapResult().setDiagnosticMessage( message ); response.getLdapResult().setResultCode( code ); response.getLdapResult().setMatchedDn( matchedDn ); this.response = response; }
/** * Creates a DecoderException * * @param message A message with meaning to a human * @param response The response to store * @param code the ResultCode * @param matchedDn The Matched DN * @param cause The Exception which caused the error */ public ResponseCarryingException( String message, ResultResponse response, ResultCodeEnum code, Dn matchedDn, Throwable cause ) { super( message, cause ); response.getLdapResult().setDiagnosticMessage( message ); response.getLdapResult().setResultCode( code ); response.getLdapResult().setMatchedDn( matchedDn ); this.response = response; }
/** * Send back an AUTH-METH-NOT-SUPPORTED error message to the client */ private void sendAuthMethNotSupported( LdapSession ldapSession, BindRequest bindRequest ) { // First, r-einit the state to Anonymous, and clear the // saslProperty map ldapSession.clearSaslProperties(); ldapSession.setAnonymous(); // And send the response to the client LdapResult bindResult = bindRequest.getResultResponse().getLdapResult(); bindResult.setResultCode( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED ); bindResult.setDiagnosticMessage( ResultCodeEnum.AUTH_METHOD_NOT_SUPPORTED.toString() + ": " + bindRequest.getSaslMechanism() + " is not a supported mechanism." ); // Write back the error ldapSession.getIoSession().write( bindRequest.getResultResponse() ); }