From 812396d6c6b9a64d713b0e343ac874a161903683 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 28 Nov 2015 10:18:46 +0100 Subject: [PATCH] [Security] remove deprecated HTTP digest auth key --- .../Security/Factory/HttpDigestFactory.php | 16 ---------------- .../DigestAuthenticationEntryPoint.php | 10 ---------- .../Firewall/DigestAuthenticationListener.php | 2 +- 3 files changed, 1 insertion(+), 27 deletions(-) diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php index 63875f83081bc..ae9322f229c21 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory/HttpDigestFactory.php @@ -58,22 +58,6 @@ public function getKey() public function addConfiguration(NodeDefinition $node) { $node - ->beforeNormalization() - ->ifTrue(function ($v) { return isset($v['key']); }) - ->then(function ($v) { - if (isset($v['secret'])) { - throw new \LogicException('Cannot set both key and secret options for http_digest, use only secret instead.'); - } - - @trigger_error('http_digest.key is deprecated since version 2.8 and will be removed in 3.0. Use http_digest.secret instead.', E_USER_DEPRECATED); - - $v['secret'] = $v['key']; - - unset($v['key']); - - return $v; - }) - ->end() ->children() ->scalarNode('provider')->end() ->scalarNode('realm')->defaultValue('Secured Area')->end() diff --git a/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php b/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php index cdb98ebb83e7b..9dfd5929459fb 100644 --- a/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php +++ b/src/Symfony/Component/Security/Http/EntryPoint/DigestAuthenticationEntryPoint.php @@ -64,16 +64,6 @@ public function start(Request $request, AuthenticationException $authException = return $response; } - /** - * @deprecated Since version 2.8, to be removed in 3.0. Use getSecret() instead. - */ - public function getKey() - { - @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 */ diff --git a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php index 41e5d6d759533..ef723ea070c34 100644 --- a/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/DigestAuthenticationListener.php @@ -78,7 +78,7 @@ public function handle(GetResponseEvent $event) } try { - $digestAuth->validateAndDecode($this->authenticationEntryPoint->getKey(), $this->authenticationEntryPoint->getRealmName()); + $digestAuth->validateAndDecode($this->authenticationEntryPoint->getSecret(), $this->authenticationEntryPoint->getRealmName()); } catch (BadCredentialsException $e) { $this->fail($event, $request, $e); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy