In my container I define how the
AdapterInterface::class should be setup, as per the Instantiation section of the docs.
I created an
AuthController to handle login login and logout routes which takes the
AdapterInterface and checks the credentials against the LoginService, logs the user out, etc. See the services part of the docs.
Then I created a
AuthenticationMiddleware applied to protected routes that checks the
isValid() method of the
Auth object and returns a
403 if it isn’t valid.