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

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

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

origin: org.apache.directory.fortress/fortress-core

/**
 * Calls the PoolMgr to perform an LDAP bind for a user/password combination.  This function is valid
 * if and only if the user entity is a member of the USERS data set.
 *
 * @param connection connection to ldap server.
 * @param szUserDn   contains the LDAP dn to the user entry in String format.
 * @param password   contains the password in clear text.
 * @return bindResponse contains the result of the operation.
 * @throws LdapException in the event of LDAP error.
 */
protected BindResponse bind( LdapConnection connection, String szUserDn, String password ) throws LdapException
{
  COUNTERS.incrementBind();
  Dn userDn = new Dn( szUserDn );
  BindRequest bindReq = new BindRequestImpl();
  bindReq.setDn( userDn );
  bindReq.setCredentials( password );
  bindReq.addControl( PP_REQ_CTRL );
  return connection.bind( bindReq );
}
origin: org.apache.directory.api/api-ldap-client-api

  @Override
  public ResultResponse process() throws LdapException
  {
    MemoryClearingBuffer passwordBuffer = MemoryClearingBuffer.newInstance( password );
    try
    {
      BindRequest bindRequest = new BindRequestImpl()
        .setDn( userDn )
        .setCredentials( passwordBuffer.getBytes() )
        .addControl( passwordPolicyRequestControl );
      return connection.bind( bindRequest );
    }
    finally
    {
      passwordBuffer.clear();
    }
  }
} );
origin: org.apache.directory.api/api-all

  @Override
  public ResultResponse process() throws LdapException
  {
    MemoryClearingBuffer passwordBuffer = MemoryClearingBuffer.newInstance( password );
    try
    {
      BindRequest bindRequest = new BindRequestImpl()
        .setDn( userDn )
        .setCredentials( passwordBuffer.getBytes() )
        .addControl( passwordPolicyRequestControl );
      return connection.bind( bindRequest );
    }
    finally
    {
      passwordBuffer.clear();
    }
  }
} );
origin: org.apache.directory.api/api-ldap-client-all

  @Override
  public ResultResponse process() throws LdapException
  {
    MemoryClearingBuffer passwordBuffer = MemoryClearingBuffer.newInstance( password );
    try
    {
      BindRequest bindRequest = new BindRequestImpl()
        .setDn( userDn )
        .setCredentials( passwordBuffer.getBytes() )
        .addControl( passwordPolicyRequestControl );
      return connection.bind( bindRequest );
    }
    finally
    {
      passwordBuffer.clear();
    }
  }
} );
org.apache.directory.api.ldap.model.messageBindRequestaddControl

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
  • getSaslMechanism
    Gets the SASL mechanism String associated with this BindRequest if the bind operation is using SASL.
  • 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
  • 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
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for WebStorm
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