I suggest the use of Lithium Connections
and Service
classes, to avoid writing your curl request that way.
Extract your legacy api connection configuration (host, port, etc) to a Connection named 'api' or whatever, then, in your adapter's check()
body, write something like:
public function check($credentials, array $options = []) {
return Connections::get('api')->connection->post('/tr42/mock_api_authenticate.php', $credentials);
}