I have not made this working, but this is after looking at the api etc . So there may be errors.
First you need to register your route something as
$app->get('/login', \Zend\Expressive\Authentication\AuthenticationMiddleware::class, 'login');
Now you may need one of the package.
Assuming you are installing https://github.com/zendframework/zend-expressive-authentication-session
You need to register the service
Zend\Expressive\Authentication\UserRepositoryInterface in your di container.
According to the authentication adapter you need to register some of the config values.
There is much more configurations
So you may want to manually look at the source code / figure out most of them.