mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-09 21:08:53 +00:00
[feature/oauth] Check that the service actually has settings
PHPBB3-11673
This commit is contained in:
parent
1e38be3fa9
commit
d63f920250
1 changed files with 9 additions and 0 deletions
|
@ -60,6 +60,15 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
// Get the service credentials for the given service
|
// Get the service credentials for the given service
|
||||||
$service_credentials = $this->get_credentials($service);
|
$service_credentials = $this->get_credentials($service);
|
||||||
|
|
||||||
|
// Check that the service has settings
|
||||||
|
if ($service_credentials['key'] == false || $service_credentials['secret'] == false)
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'status' => LOGIN_ERROR_EXTERNAL_AUTH,
|
||||||
|
'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE',
|
||||||
|
'user_row' => array('user_id' => ANONYMOUS),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$service_factory = new \OAuth\ServiceFactory();
|
$service_factory = new \OAuth\ServiceFactory();
|
||||||
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
|
$uri_factory = new \OAuth\Common\Http\Uri\UriFactory();
|
||||||
|
|
Loading…
Add table
Reference in a new issue