mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
12.32.2015 5297993426c93d4bcafcdd433b4cf2c24b4a8ebc
Remove unused import
1 files modified
35 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/extensions/AnonymousSASLMechanismHandler.java 35 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/extensions/AnonymousSASLMechanismHandler.java
@@ -26,22 +26,20 @@
 */
package org.opends.server.extensions;
import org.opends.server.admin.std.server.AnonymousSASLMechanismHandlerCfg;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.api.SASLMechanismHandler;
import org.forgerock.opendj.config.server.ConfigException;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ResultCode;
import org.opends.server.admin.std.server.AnonymousSASLMechanismHandlerCfg;
import org.opends.server.api.SASLMechanismHandler;
import org.opends.server.core.BindOperation;
import org.opends.server.core.DirectoryServer;
import org.opends.server.types.*;
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.opendj.ldap.ByteString;
import static org.opends.messages.ExtensionMessages.*;
import org.opends.server.types.AdditionalLogItem;
import org.opends.server.types.AuthenticationInfo;
import org.opends.server.types.InitializationException;
import static org.opends.server.util.ServerConstants.*;
/**
 * This class provides an implementation of a SASL mechanism, as defined in RFC
 * 4505, that does not perform any authentication.  That is, anyone attempting
@@ -53,7 +51,6 @@
public class AnonymousSASLMechanismHandler
       extends SASLMechanismHandler<AnonymousSASLMechanismHandlerCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
@@ -66,26 +63,21 @@
    super();
  }
  /** {@inheritDoc} */
  @Override
  public void initializeSASLMechanismHandler(AnonymousSASLMechanismHandlerCfg
                                                  configuration)
  public void initializeSASLMechanismHandler(AnonymousSASLMechanismHandlerCfg configuration)
         throws ConfigException, InitializationException
  {
    // No real implementation is required.  Simply register with the Directory
    // Server for the ANONYMOUS mechanism.
    DirectoryServer.registerSASLMechanismHandler(SASL_MECHANISM_ANONYMOUS,
                                                 this);
    DirectoryServer.registerSASLMechanismHandler(SASL_MECHANISM_ANONYMOUS, this);
  }
  /** {@inheritDoc} */
  @Override
  public void finalizeSASLMechanismHandler()
  {
    DirectoryServer.deregisterSASLMechanismHandler(SASL_MECHANISM_ANONYMOUS);
  }
  /** {@inheritDoc} */
  @Override
  public void processSASLBind(BindOperation bindOperation)
  {
@@ -103,15 +95,12 @@
      }
    }
    // Authenticate the client anonymously and indicate that the bind was
    // successful.
    // Authenticate the client anonymously and indicate that the bind was successful.
    AuthenticationInfo authInfo = new AuthenticationInfo();
    bindOperation.setAuthenticationInfo(authInfo);
    bindOperation.setResultCode(ResultCode.SUCCESS);
  }
  /** {@inheritDoc} */
  @Override
  public boolean isPasswordBased(String mechanism)
  {
@@ -119,7 +108,6 @@
    return false;
  }
  /** {@inheritDoc} */
  @Override
  public boolean isSecure(String mechanism)
  {
@@ -127,4 +115,3 @@
    return false;
  }
}