Skip to content

Commit f4aa65e

Browse files
committed
Update docs for #212
1 parent f22743a commit f4aa65e

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

docs/Quick-start-and-introduction.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,25 @@ Example of configuring the authentication middleware using `authentication` appl
2020

2121
```php
2222
use Authentication\AuthenticationService;
23-
use Authentication\AuthenticationServiceInterface;
23+
use Authentication\AuthenticationServiceProviderInterface;
2424
use 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'

0 commit comments

Comments
 (0)