diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2015-11-10 14:34:42 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2015-11-10 14:34:42 +0100 |
commit | 8b79dc69a34467ae2cab5e98aba73ab3b5221605 (patch) | |
tree | 14b7c581c3eebe69719f5a5000a2a051a0a13984 /Http/EntryPoint/DigestAuthenticationEntryPoint.php | |
parent | a24ab6c7c436dfbb3b690e28425b8f0af8b65e6d (diff) | |
parent | b78eacaa57a9b0171fd4817b99510ab15f60d778 (diff) | |
download | symfony-security-8b79dc69a34467ae2cab5e98aba73ab3b5221605.zip symfony-security-8b79dc69a34467ae2cab5e98aba73ab3b5221605.tar.gz symfony-security-8b79dc69a34467ae2cab5e98aba73ab3b5221605.tar.bz2 |
Merge branch '2.8'v3.0.0-BETA1
* 2.8:
Fixed tabs when there are several groups of tabs in the same page
Fix mode
Fixed failing test for HHVM
Removed unused logic in MockStream
Update coding standard for MockStream
[Filesystem] added tempnam() stream wrapper aware version of PHP's native tempnam() and fixed dumpFile to allow dumping to streams
Renamed key to secret
Diffstat (limited to 'Http/EntryPoint/DigestAuthenticationEntryPoint.php')
-rw-r--r-- | Http/EntryPoint/DigestAuthenticationEntryPoint.php | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/Http/EntryPoint/DigestAuthenticationEntryPoint.php index 89f80ad..cdb98eb 100644 --- a/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -24,15 +24,15 @@ use Psr\Log\LoggerInterface; */ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterface { - private $key; + private $secret; private $realmName; private $nonceValiditySeconds; private $logger; - public function __construct($realmName, $key, $nonceValiditySeconds = 300, LoggerInterface $logger = null) + public function __construct($realmName, $secret, $nonceValiditySeconds = 300, LoggerInterface $logger = null) { $this->realmName = $realmName; - $this->key = $key; + $this->secret = $secret; $this->nonceValiditySeconds = $nonceValiditySeconds; $this->logger = $logger; } @@ -43,7 +43,7 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac public function start(Request $request, AuthenticationException $authException = null) { $expiryTime = microtime(true) + $this->nonceValiditySeconds * 1000; - $signatureValue = md5($expiryTime.':'.$this->key); + $signatureValue = md5($expiryTime.':'.$this->secret); $nonceValue = $expiryTime.':'.$signatureValue; $nonceValueBase64 = base64_encode($nonceValue); @@ -65,11 +65,21 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac } /** - * @return string + * @deprecated Since version 2.8, to be removed in 3.0. Use getSecret() instead. */ public function getKey() { - return $this->key; + @trigger_error(__method__.'() is deprecated since version 2.8 and will be removed in 3.0. Use getSecret() instead.', E_USER_DEPRECATED); + + return $this->getSecret(); + } + + /** + * @return string + */ + public function getSecret() + { + return $this->secret; } /** |