[Security] remove deprecated HTTP digest auth key
This commit is contained in:
parent
743e670f4a
commit
812396d6c6
@ -58,22 +58,6 @@ class HttpDigestFactory implements SecurityFactoryInterface
|
||||
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()
|
||||
|
@ -64,16 +64,6 @@ class DigestAuthenticationEntryPoint implements AuthenticationEntryPointInterfac
|
||||
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
|
||||
*/
|
||||
|
@ -78,7 +78,7 @@ class DigestAuthenticationListener implements ListenerInterface
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
Reference in New Issue
Block a user