Examples of SASLMechanismHandler


Examples of nu.fw.jeti.plugins.xmpp.sasl.SaslMechanismHandler

     
  public static void init(Backend backend)
  {
 
    backend.addExtensionHandler(StartTls.NAMESPACE,new StartTLSExtensionHandler());
    backend.addExtensionHandler("urn:ietf:params:xml:ns:xmpp-sasl",new SaslMechanismHandler());
    backend.addExtensionHandler("urn:ietf:params:xml:ns:xmpp-bind",new IQBindHandler());
    backend.addExtensionHandler("urn:ietf:params:xml:ns:xmpp-session",new IQSessionHandler());
   
  }
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

      if (handlerConfiguration.isEnabled())
      {
        String className = handlerConfiguration.getJavaClass();
        try
        {
          SASLMechanismHandler handler = loadHandler(className,
                                                     handlerConfiguration,
                                                     true);
          handlers.put(handlerConfiguration.dn(), handler);
        }
        catch (InitializationException ie)
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

    if (! configuration.isEnabled())
    {
      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }

    SASLMechanismHandler handler = null;

    // Get the name of the class and make sure we can instantiate it as a SASL
    // mechanism handler.
    String className = configuration.getJavaClass();
    try
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

  {
    ResultCode        resultCode          = ResultCode.SUCCESS;
    boolean           adminActionRequired = false;
    ArrayList<Message> messages            = new ArrayList<Message>();

    SASLMechanismHandler handler = handlers.remove(configuration.dn());
    if (handler != null)
    {
      handler.finalizeSASLMechanismHandler();
    }

    return new ConfigChangeResult(resultCode, adminActionRequired, messages);
  }
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

    boolean           adminActionRequired = false;
    ArrayList<Message> messages            = new ArrayList<Message>();


    // Get the existing handler if it's already enabled.
    SASLMechanismHandler existingHandler = handlers.get(configuration.dn());


    // If the new configuration has the handler disabled, then disable it if it
    // is enabled, or do nothing if it's already disabled.
    if (! configuration.isEnabled())
    {
      if (existingHandler != null)
      {
        SASLMechanismHandler handler = handlers.remove(configuration.dn());
        if (handler != null)
        {
          handler.finalizeSASLMechanismHandler();
        }
      }

      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }


    // Get the class for the SASL handler.  If the handler is already enabled,
    // then we shouldn't do anything with it although if the class has changed
    // then we'll at least need to indicate that administrative action is
    // required.  If the handler is disabled, then instantiate the class and
    // initialize and register it as a SASL mechanism handler.
    String className = configuration.getJavaClass();
    if (existingHandler != null)
    {
      if (! className.equals(existingHandler.getClass().getName()))
      {
        adminActionRequired = true;
      }

      return new ConfigChangeResult(resultCode, adminActionRequired, messages);
    }

    SASLMechanismHandler handler = null;
    try
    {
      handler = loadHandler(className, configuration, true);
    }
    catch (InitializationException ie)
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

           SASLMechanismHandlerCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends SASLMechanismHandler> handlerClass =
           propertyDefinition.loadClass(className, SASLMechanismHandler.class);
      SASLMechanismHandler handler = handlerClass.newInstance();

      if (initialize)
      {
        Method method = handler.getClass().getMethod(
            "initializeSASLMechanismHandler",
            configuration.configurationClass());
        method.invoke(handler, configuration);
      }
      else
      {
        Method method =
             handler.getClass().getMethod("isConfigurationAcceptable",
                                          SASLMechanismHandlerCfg.class,
                                          List.class);

        List<Message> unacceptableReasons = new ArrayList<Message>();
        Boolean acceptable = (Boolean) method.invoke(handler, configuration,
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    SASLMechanismHandler cramMD5Handler =
         DirectoryServer.getSASLMechanismHandler("CRAM-MD5");
    DirectoryServer.deregisterSASLMechanismHandler("CRAM-MD5");


    Socket s = new Socket("127.0.0.1", TestCaseUtils.getServerLdapPort());
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    SASLMechanismHandler digestMD5Handler =
         DirectoryServer.getSASLMechanismHandler("DIGEST-MD5");
    DirectoryServer.deregisterSASLMechanismHandler("DIGEST-MD5");


    Socket s = new Socket("127.0.0.1", TestCaseUtils.getServerLdapPort());
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    SASLMechanismHandler externalHandler =
         DirectoryServer.getSASLMechanismHandler("EXTERNAL");
    DirectoryServer.deregisterSASLMechanismHandler("EXTERNAL");


    String keyStorePath   = DirectoryServer.getInstanceRoot() + File.separator +
View Full Code Here

Examples of org.nasutekds.server.api.SASLMechanismHandler

         conn.processAdd(e.getDN(), e.getObjectClasses(), e.getUserAttributes(),
                         e.getOperationalAttributes());
    assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS);


    SASLMechanismHandler externalHandler =
         DirectoryServer.getSASLMechanismHandler("EXTERNAL");
    DirectoryServer.deregisterSASLMechanismHandler("EXTERNAL");


    String keyStorePath   = DirectoryServer.getInstanceRoot() + File.separator +
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.