mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Throw exception when authentication class dont support authentication/proxyAuthentication method.
This commit is contained in:
parent
b9010b05f2
commit
64dcca61ef
1 changed files with 6 additions and 0 deletions
|
@ -475,6 +475,9 @@ class HttpSocket extends CakeSocket {
|
|||
if (!App::import('Lib', 'http/' . $authClass)) {
|
||||
throw new Exception(__('Unknown authentication method.'));
|
||||
}
|
||||
if (!method_exists($authClass, 'authentication')) {
|
||||
throw new Exception(sprintf(__('The %s do not support authentication.'), $authClass));
|
||||
}
|
||||
call_user_func("$authClass::authentication", $this);
|
||||
}
|
||||
|
||||
|
@ -497,6 +500,9 @@ class HttpSocket extends CakeSocket {
|
|||
if (!App::import('Lib', 'http/' . $authClass)) {
|
||||
throw new Exception(__('Unknown authentication method for proxy.'));
|
||||
}
|
||||
if (!method_exists($authClass, 'proxyAuthentication')) {
|
||||
throw new Exception(sprintf(__('The %s do not support proxy authentication.'), $authClass));
|
||||
}
|
||||
call_user_func("$authClass::proxyAuthentication", $this);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue