diff options
author | WouterJ <waldio.webdesign@gmail.com> | 2015-06-29 13:59:59 +0200 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-07-02 01:04:13 +0200 |
commit | cba12eee6f9d829e7c2307982513d01b99830b83 (patch) | |
tree | aed03cf12bf56633ae29157a27a3305e5557f770 /Core/Authentication/Provider/AnonymousAuthenticationProvider.php | |
parent | c839c1382bfd96b6a356a2e9498bf5bd1ff775c1 (diff) | |
download | symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.zip symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.tar.gz symfony-security-cba12eee6f9d829e7c2307982513d01b99830b83.tar.bz2 |
[DX] [Security] Renamed Token#getKey() to getSecret()
Diffstat (limited to 'Core/Authentication/Provider/AnonymousAuthenticationProvider.php')
-rw-r--r-- | Core/Authentication/Provider/AnonymousAuthenticationProvider.php | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php index 7fbbf85..ff3d15f 100644 --- a/Core/Authentication/Provider/AnonymousAuthenticationProvider.php +++ b/Core/Authentication/Provider/AnonymousAuthenticationProvider.php @@ -22,16 +22,22 @@ use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken; */ class AnonymousAuthenticationProvider implements AuthenticationProviderInterface { - private $key; + /** + * Used to determine if the token is created by the application + * instead of a malicious client. + * + * @var string + */ + private $secret; /** * Constructor. * - * @param string $key The key shared with the authentication token + * @param string $secret The secret shared with the AnonymousToken */ - public function __construct($key) + public function __construct($secret) { - $this->key = $key; + $this->secret = $secret; } /** @@ -43,7 +49,7 @@ class AnonymousAuthenticationProvider implements AuthenticationProviderInterface return; } - if ($this->key !== $token->getKey()) { + if ($this->secret !== $token->getSecret()) { throw new BadCredentialsException('The Token does not contain the expected key.'); } |