protected byte[] getCredentialBytes(Connection connection, Properties securityProperties)
        throws Exception {
      InternalDistributedSystem distributedSystem = getConnectedSystem();
      DistributedMember server =
          new InternalDistributedMember(connection.getSocket().getInetAddress(),
              connection.getSocket().getPort(), false);
      String authInitMethod =
          distributedSystem.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);

      Properties credentials = Handshake.getCredentials(authInitMethod, securityProperties,
          server, false, distributedSystem.getLogWriter(),
          distributedSystem.getSecurityLogWriter());
      byte[] credentialBytes;
      try (HeapDataOutputStream heapdos = new HeapDataOutputStream(KnownVersion.CURRENT)) {
        DataSerializer.writeProperties(credentials, heapdos);
        credentialBytes = ((ConnectionImpl) connection).encryptBytes(heapdos.toByteArray());
      }
      return credentialBytes;
    }
Sends the auth credentials to the server for a particular user. Used in multiple user mode of
authentication.

@param location The ServerLocation instance whose connection instance will be used to perform
       the operation.
@param pool The connection pool to use for this operation.
@return Object unique user-id.
geode-core/src/main/java/org/apache/geode/cache/client/internal/AuthenticateUserOp.java