Package net.spy.memcached.auth

Examples of net.spy.memcached.auth.AuthDescriptor


        String username = properties.get(PROP_USERNAME);
        String password = properties.get(PROP_PASSWORD);
        if (username == null || password == null) {
            return null;
        }
        return new AuthDescriptor(new String[] { "PLAIN" },
                new PlainCallbackHandler(username, password));
    }
View Full Code Here


            if (memcachePassword == null) {
                throw new ConfigurationException("Bad configuration for memcached: missing password");
            }

            // Use plain SASL to connect to memcached
            AuthDescriptor ad = new AuthDescriptor(new String[]{"PLAIN"},
                    new PlainCallbackHandler(memcacheUser, memcachePassword));
            ConnectionFactory cf = new ConnectionFactoryBuilder()
                    .setProtocol(ConnectionFactoryBuilder.Protocol.BINARY)
                    .setAuthDescriptor(ad)
                    .build();
View Full Code Here

  @Override
  public AuthDescriptor getAuthDescriptor() {
    if (!configurationProvider.getAnonymousAuthBucket().equals(bucket)
        && bucket != null) {
      return new AuthDescriptor(new String[] {},
        new PlainCallbackHandler(bucket, pass));
    } else {
      return null;
    }
  }
View Full Code Here

  @Override
  public AuthDescriptor getAuthDescriptor() {
    if (!configurationProvider.getAnonymousAuthBucket().equals(bucket)
        && bucket != null) {
      return new AuthDescriptor(new String[] {},
        new PlainCallbackHandler(bucket, pass));
    } else {
      return null;
    }
  }
View Full Code Here

TOP

Related Classes of net.spy.memcached.auth.AuthDescriptor

Copyright © 2018 www.massapicom. 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.