Identifier in authorisation callback

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

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

           return new Result(
                ['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


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

Thanks, Christoph