Permalink
Browse files

bug #3514 Fixed some small typos in code example (RobinvdVleuten)

This PR was merged into the 2.4 branch.

Discussion
----------

Fixed some small typos in code example

Hi,

I found some small typos in the code example and fixed it:
http://symfony.com/doc/current/cookbook/security/api_key_authentication.html

Cheers,

Robin

Commits
-------

0c6cfd1 Example creates a class not an interface
ea5531b An interface should be implemented
064c740 Fixed small typo in code example
  • Loading branch information...
weaverryan committed Feb 4, 2014
2 parents 0dc8c26 + 0c6cfd1 commit 86e02c6f04b4cdfc43707e0bb73bc7d336f50cac
Showing with 2 additions and 2 deletions.
  1. +2 −2 cookbook/security/api_key_authentication.rst
@@ -38,7 +38,7 @@ value and then a User object is created::
{
protected $userProvider;
public function __construct(ApiKeyUserProviderInterface $userProvider)
public function __construct(ApiKeyUserProvider $userProvider)
{
$this->userProvider = $userProvider;
}
@@ -59,7 +59,7 @@ value and then a User object is created::
public function authenticateToken(TokenInterface $token, UserProviderInterface $userProvider, $providerKey)
{
$apiKey = $token->getCredentials();
$username = $this->userProvider->getUsernameForApiKey($apiKey)
$username = $this->userProvider->getUsernameForApiKey($apiKey);
if (!$username) {
throw new AuthenticationException(

0 comments on commit 86e02c6

Please sign in to comment.