Identifier in authorisation callback

In my cakephp 5 application → src/Application.php I configured a form authenticator and a callback identificator:

$service->loadAuthenticator('Authentication.Form');
$service->loadIdentifier('Authentication.Callback', [
   'callback' => function($data) {
           $result['username'] = $data['username'];
           if (!empty($result)) {
            return new Result($result, Result::SUCCESS);
           }

           return new Result(
                null,
                Result::FAILURE_OTHER,
                ['message' => 'unknown user.']);

           return NULL;
           }
        ]);

Passing of username and password from the login form works, the authentification itself also, but I get no identificator, inside the Users controller I get NULL for

$this->Authentication->getIdentity());

Maybe the $result object doesn’t contain the right data?

Thanks, Christoph