public AuthenticationConfigurationBuilder Authentication() { if (m_Authentication == null) { m_Authentication = new AuthenticationConfigurationBuilder(parentBuilder, jniBuilder.Authentication()); } return(m_Authentication); }
private IRemoteCache <String, String> InitCache(string user, string password, string cacheName = AUTH_CACHE) { ConfigurationBuilder conf = new ConfigurationBuilder(); conf.ProtocolVersion("2.8").AddServer() .Host(HOTROD_HOST) .Port(HOTROD_PORT) .ConnectionTimeout(90000) .SocketTimeout(900); AuthenticationConfigurationBuilder authBuilder = conf.Security().Authentication(); authBuilder.Enable() .SaslMechanism(GetMech()) .ServerFQDN("node0") .SetupCallback(user, password, REALM); marshaller = new JBasicMarshaller(); conf.Marshaller(marshaller); Configuration c = conf.Build(); RemoteCacheManager remoteManager = new RemoteCacheManager(c, true); IRemoteCache <string, string> cache = remoteManager.GetCache <string, string>(cacheName); return(cache); }