File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,25 @@ Example of configuring the authentication middleware using `authentication` appl
2020
2121``` php
2222use Authentication\AuthenticationService;
23- use Authentication\AuthenticationServiceInterface ;
23+ use Authentication\AuthenticationServiceProviderInterface ;
2424use Authentication\Middleware\AuthenticationMiddleware;
25+ use Psr\Http\Message\ResponseInterface;
26+ use Psr\Http\Message\ServerRequestInterface;
2527
26- class Application extends BaseApplication
28+ class Application extends BaseApplication implements AuthenticationServiceProviderInterface
2729{
28- public function authentication(AuthenticationServiceInterface $service)
30+
31+ /**
32+ * Returns a service provider instance.
33+ *
34+ * @param \Psr\Http\Message\ServerRequestInterface $request Request
35+ * @param \Psr\Http\Message\ResponseInterface $response Response
36+ * @return \Authentication\AuthenticationServiceInterface
37+ */
38+ public function getAuthenticationService(ServerRequestInterface $request, ResponseInterface $response)
2939 {
40+ $service = new AuthenticationService();
41+
3042 $fields = [
3143 'username' => 'email',
3244 'password' => 'password'
You can’t perform that action at this time.
0 commit comments