Tabnine Logo
BindRequest.getSaslMechanism
Code IndexAdd Tabnine to your IDE (free)

How to use
getSaslMechanism
method
in
org.apache.directory.api.ldap.model.message.BindRequest

Best Java code snippets using org.apache.directory.api.ldap.model.message.BindRequest.getSaslMechanism (Showing top 15 results out of 315)

origin: org.apache.directory.api/api-ldap-codec-core

/**
 * {@inheritDoc}
 */
@Override
public String getSaslMechanism()
{
  return getDecorated().getSaslMechanism();
}
origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public String getSaslMechanism()
{
  return getDecorated().getSaslMechanism();
}
origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public String getSaslMechanism()
{
  return getDecorated().getSaslMechanism();
}
origin: org.apache.directory.api/api-ldap-client-all

/**
 * {@inheritDoc}
 */
@Override
public String getSaslMechanism()
{
  return getDecorated().getSaslMechanism();
}
origin: org.apache.directory.server/apacheds-protocol-ldap

private void handleSaslAuthPending( LdapSession ldapSession, BindRequest bindRequest ) throws Exception
{
  // First, check that we have the same mechanism
  String saslMechanism = bindRequest.getSaslMechanism();
  // The empty mechanism is also a request for a new Bind session
  if ( Strings.isEmpty( saslMechanism )
    || !ldapSession.getSaslProperty( SaslConstants.SASL_MECH ).equals( saslMechanism ) )
  {
    sendAuthMethNotSupported( ldapSession, bindRequest );
    return;
  }
  // We have already received a first BindRequest, and sent back some challenge.
  // First, check if the mechanism is the same
  MechanismHandler mechanismHandler = handlers.get( saslMechanism );
  if ( mechanismHandler == null )
  {
    String message = I18n.err( I18n.ERR_161, saslMechanism );
    // Clear the saslProperties, and move to the anonymous state
    ldapSession.clearSaslProperties();
    ldapSession.setAnonymous();
    LOG.error( message );
    throw new IllegalArgumentException( message );
  }
  // Get the previously created SaslServer instance
  SaslServer ss = mechanismHandler.handleMechanism( ldapSession, bindRequest );
  generateSaslChallengeOrComplete( ldapSession, ss, bindRequest );
}
origin: org.apache.directory.api/api-ldap-codec-core

  /**
   * {@inheritDoc}
   */
  @Override
  public void action( LdapMessageContainer<BindRequestDecorator> container )
  {
    BindRequest bindRequestMessage = container.getMessage();
    TLV tlv = container.getCurrentTLV();

    // We have to handle the special case of a 0 length
    // mechanism
    if ( tlv.getLength() == 0 )
    {
      bindRequestMessage.setSaslMechanism( "" );
    }
    else
    {
      bindRequestMessage.setSaslMechanism( Strings.utf8ToString( tlv.getValue().getData() ) );
    }

    // We can have an END transition
    container.setGrammarEndAllowed( true );

    if ( LOG.isDebugEnabled() )
    {
      LOG.debug( I18n.msg( I18n.MSG_05118_THE_SASL_MECHANISM_IS, bindRequestMessage.getSaslMechanism() ) );
    }
  }
}
origin: org.apache.directory.api/api-all

  /**
   * {@inheritDoc}
   */
  @Override
  public void action( LdapMessageContainer<BindRequestDecorator> container )
  {
    BindRequest bindRequestMessage = container.getMessage();
    TLV tlv = container.getCurrentTLV();

    // We have to handle the special case of a 0 length
    // mechanism
    if ( tlv.getLength() == 0 )
    {
      bindRequestMessage.setSaslMechanism( "" );
    }
    else
    {
      bindRequestMessage.setSaslMechanism( Strings.utf8ToString( tlv.getValue().getData() ) );
    }

    // We can have an END transition
    container.setGrammarEndAllowed( true );

    if ( LOG.isDebugEnabled() )
    {
      LOG.debug( I18n.msg( I18n.MSG_05118_THE_SASL_MECHANISM_IS, bindRequestMessage.getSaslMechanism() ) );
    }
  }
}
origin: org.apache.directory.api/api-ldap-client-all

  /**
   * {@inheritDoc}
   */
  @Override
  public void action( LdapMessageContainer<BindRequestDecorator> container )
  {
    BindRequest bindRequestMessage = container.getMessage();
    TLV tlv = container.getCurrentTLV();

    // We have to handle the special case of a 0 length
    // mechanism
    if ( tlv.getLength() == 0 )
    {
      bindRequestMessage.setSaslMechanism( "" );
    }
    else
    {
      bindRequestMessage.setSaslMechanism( Strings.utf8ToString( tlv.getValue().getData() ) );
    }

    // We can have an END transition
    container.setGrammarEndAllowed( true );

    if ( LOG.isDebugEnabled() )
    {
      LOG.debug( I18n.msg( I18n.MSG_05118_THE_SASL_MECHANISM_IS, bindRequestMessage.getSaslMechanism() ) );
    }
  }
}
origin: org.apache.directory.server/apacheds-protocol-ldap

/**
 * 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() );
}
origin: org.apache.directory.api/api-ldap-client-all

  { bindRequest.getSaslMechanism() },
saslRequest.getAuthorizationId(),
"ldap",
String message = I18n.err( I18n.ERR_04158_CANNOT_FIND_SASL_FACTORY_FOR_MECH, bindRequest.getSaslMechanism() );
LOG.error( message );
throw new LdapException( message );
bindRequestCopy.setSaslMechanism( bindRequest.getSaslMechanism() );
bindRequestCopy.setSimple( bindRequest.isSimple() );
bindRequestCopy.setVersion3( bindRequest.getVersion3() );
origin: org.apache.directory.api/api-ldap-client-api

  { bindRequest.getSaslMechanism() },
saslRequest.getAuthorizationId(),
"ldap",
String message = I18n.err( I18n.ERR_04158_CANNOT_FIND_SASL_FACTORY_FOR_MECH, bindRequest.getSaslMechanism() );
LOG.error( message );
throw new LdapException( message );
bindRequestCopy.setSaslMechanism( bindRequest.getSaslMechanism() );
bindRequestCopy.setSimple( bindRequest.isSimple() );
bindRequestCopy.setVersion3( bindRequest.getVersion3() );
origin: org.apache.directory.api/api-all

  { bindRequest.getSaslMechanism() },
saslRequest.getAuthorizationId(),
"ldap",
String message = I18n.err( I18n.ERR_04158_CANNOT_FIND_SASL_FACTORY_FOR_MECH, bindRequest.getSaslMechanism() );
LOG.error( message );
throw new LdapException( message );
bindRequestCopy.setSaslMechanism( bindRequest.getSaslMechanism() );
bindRequestCopy.setSimple( bindRequest.isSimple() );
bindRequestCopy.setVersion3( bindRequest.getVersion3() );
origin: org.apache.directory.server/apacheds-core-api

bindContext.setSaslMechanism( bindRequest.getSaslMechanism() );
origin: org.apache.directory.server/apacheds-protocol-ldap

String saslMechanism = bindRequest.getSaslMechanism();
origin: org.apache.directory.server/apacheds-protocol-ldap

String saslMechanism = bindRequest.getSaslMechanism();
byte[] password = null;
org.apache.directory.api.ldap.model.messageBindRequestgetSaslMechanism

Javadoc

Gets the SASL mechanism String associated with this BindRequest if the bind operation is using SASL.

Popular methods of BindRequest

  • setCredentials
    Sets the simple credentials associated with a simple authentication attempt. Ignored if this request
  • getName
    Gets the name of the subject in this authentication request. This field may take on a null value (a
  • isSimple
    Checks to see if the authentication mechanism is simple and not SASL based.
  • getCredentials
    Gets the simple credentials associated with a simple authentication attempt or null if this request
  • getDn
    Gets the DN of the subject in this authentication request. This field may take on a null value (a ze
  • setDn
    Sets the DN of the subject in this authentication request. This field may take on a null value (or a
  • setName
    Sets the name of the subject in this authentication request. This field may take on a null value (or
  • getControls
  • getVersion3
    Gets whether or not the Ldap v3 protocol is used. Normally this would extract a version number from
  • addControl
  • isVersion3
    Checks to see if the Ldap v3 protocol is used. Normally this would extract a version number from the
  • setMessageId
  • isVersion3,
  • setMessageId,
  • setSaslMechanism,
  • setSimple,
  • setVersion3,
  • addAllControls,
  • getMessageId,
  • getSimple,
  • getType

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • onCreateOptionsMenu (Activity)
  • Kernel (java.awt.image)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Reference (javax.naming)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now