You can specify a user credential for a map. With a user credential on a map, you can have two users interacting with the same data grid through a web application.
credentialAuthentication=required
authenticationRetryCount=3
credentialGeneratorAssembly=IBM.WebSphere.Caching.CredentialGenerator, Version=8.6.0.0, Culture=neutral, PublicKeyToken=b439a24ee43b0816
credentialGeneratorClass=IBM.WebSphere.Caching.Security.UserPasswordCredentialGenerator
credentialGeneratorProps=manager manager1
//GridManagerFactory.GetGridManager
IGridManager gm = GridManagerFactory.GetGridManager();
//IGridManager.Connect
ICatalogDomainInfo cdi = gm.CatalogDomainManager.CreateCatalogDomainInfo(hostAndPort);
ctx = gm.Connect(cdi, "client.properties");
//IGridManager.GetGrid
IGrid grid = gm.GetGrid( ctx, "Grid");
ICredentialGenerator credGenManager = new UserPasswordCredentialGenerator("manager", "manager1");
ICredentialGenerator credGenOperator = new UserPasswordCredentialGenerator("operator", "operator1");
//IGrid.GetGridMap
IGridMapPessimisticAutoTx<Object, Object> gridMap1 = grid.GetGridMapPessimisticAutoTx<Object, Object>("Map1", credGenManager);
IGridMapPessimisticAutoTx<Object, Object> gridMap2 = grid.GetGridMapPessimisticAutoTx<Object, Object>("Map1", credGenOperator);