CouchClient client = documentDesign.getDatabase().getClient();
CouchFactory factory = new CouchFactory();
CouchClient userClient = factory.getClient(contextCookie, client);
CouchSession session = userClient.getSession();
CouchAuthenticationContext authContext = session.getAuthenticationContext();
return authContext;
}