anchor.diff:    void close() override { return; }
   };
   
  -int main(int argc, char** argv) {
  -  auto config = Properties::create();
  -  config->insert(SECURITY_USERNAME, "root");
  -  config->insert(SECURITY_PASSWORD, "root");
  -
  -  auto cacheFactory = CacheFactory(config);
  -  auto authInitialize = std::make_shared<UserPasswordAuthInit>();
  -  cacheFactory.set("log-level", "none");
  -  cacheFactory.setAuthInitialize(authInitialize);
  -
  -  auto cache = cacheFactory.create();
  -  auto poolFactory = cache.getPoolManager().createFactory();
  -
  -  poolFactory.addLocator("localhost", 10334);
  -  auto pool = poolFactory.create("pool");
  -  auto regionFactory = cache.createRegionFactory(RegionShortcut::PROXY);
  -  auto region = regionFactory.setPoolName("pool").create("example_userinfo");
  -
  -  region->put("rtimmons", "Robert Timmons");
  -  region->put("scharles", "Sylvia Charles");
  -
  -  auto user1 = region->get("rtimmons");
  -  auto user2 = region->get("scharles");
  -  std::cout << "  rtimmons = "
  -            << std::dynamic_pointer_cast<CacheableString>(user1)->value()
  -            << std::endl;
  -  std::cout << "  scharles = "
  -            << std::dynamic_pointer_cast<CacheableString>(user2)->value()
  -            << std::endl;
  -
  -  cache.close();
  -}
   ```
  
positive.code: 
  
  ```cs
  using System;
  using Apache.Geode.Client;
  
  namespace Apache.Geode.Examples.AuthInitialize
  {
    class Program
    {
      class ExampleAuthInitialize : IAuthInitialize
      {
  	public ExampleAuthInitialize()
  	{
  	    // TODO initialize your resources here
  	    Console.Out.WriteLine("ExampleAuthInitialize::ExampleAuthInitialize called");
  	}
  
  	public void Close()
  	{
  	    // TODO close your resources here
  	    Console.Out.WriteLine("ExampleAuthInitialize::Close called");
  	}
  
  	public Properties<string, object> GetCredentials(Properties<string, string> props, string server)
  	{
  	    // TODO get your username and password
  	    Console.Out.WriteLine("ExampleAuthInitialize::GetCredentials called");
  
  	    var credentials = new Properties<string, object>();
  	    credentials.Insert("username", "john");
  	    credentials.Insert("password", "secret");
  	    return credentials;
  	}
        }
  
      static void Main(string[] args)
      {
        var cacheFactory = new CacheFactory()
            .Set("log-level", "none")
            .SetAuthInitialize(new ExampleAuthInitialize());
  
        var cache = cacheFactory.Create();
        var poolFactory = cache.GetPoolFactory()
            .AddLocator("localhost", 10334);
        poolFactory.Create("pool");
        var regionFactory = cache.CreateRegionFactory(RegionShortcut.PROXY)
            .SetPoolName("pool");
        var region = regionFactory.Create<string, string>("region");
  
        region["a"] = "1";
        region["b"] = "2";
  
        var a = region["a"];
        var b = region["b"];
  
        Console.Out.WriteLine("a = " + a);
        Console.Out.WriteLine("b = " + b);
  
        cache.Close();
      }
    }
  }
  
  ```
  
  
negative.code: limitations under the License.
  -->
  
  A client is authenticated when it connects with valid credentials to a <%=vars.product_name%> cache server that is configured with the client `Authenticator` callback.
  For details on the server's role in authentication and what it expects from the client, see [Implementing Authentication](geodeman/managing/security/implementing_authentication.html) in the *<%=vars.product_name%> User Guide*.
  
  Examples of various implementations can be found in the Native Client source distribution's `../templates/security` directory.
  
  In your application, authentication credentials must be set when creating the cache. In practice,
  this means setting the authentication credentials when you create the CacheFactory.
  