code: public Object getCloudantClient(int resAuth, List<? extends ResourceInfo.Property> loginPropertyList) throws Exception {
          AuthData containerAuthData = null;
          if (resAuth == ResourceInfo.AUTH_CONTAINER) {
              containerAuthData = getContainerAuthData(loginPropertyList);
          }
  
          String userName = containerAuthData == null ? (String) props.get(USERNAME) : containerAuthData.getUserName();
          String password = null;
          if (containerAuthData == null) {
              SerializableProtectedString protectedPwd = (SerializableProtectedString) props.get(PASSWORD);
              if (protectedPwd != null) {
                  password = String.valueOf(protectedPwd.getChars());
                  password = PasswordUtil.getCryptoAlgorithm(password) == null ? password : PasswordUtil.decode(password);
              }
          } else
              password = String.valueOf(containerAuthData.getPassword());
  
          final ClientKey key = new ClientKey(null, userName, password);
          return clients.get(key);
      }
docs: Return the cloudant client object used for a particular username and password
  
  @param resAuth
  @param loginPropertyList
  @return CloudantClient object
  @throws Exception