mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/oauth] Clean up unneeded complexity
PHPBB3-11673
This commit is contained in:
parent
f852485513
commit
4c48da0597
1 changed files with 1 additions and 16 deletions
|
@ -67,13 +67,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
*/
|
*/
|
||||||
protected $auth_provider_oauth_token_account_assoc;
|
protected $auth_provider_oauth_token_account_assoc;
|
||||||
|
|
||||||
/**
|
|
||||||
* Cached services once they has been created
|
|
||||||
*
|
|
||||||
* @var array Contains \OAuth\Common\Service\ServiceInterface or null
|
|
||||||
*/
|
|
||||||
protected $services;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All OAuth service providers
|
* All OAuth service providers
|
||||||
*
|
*
|
||||||
|
@ -108,7 +101,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
$this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table;
|
$this->auth_provider_oauth_token_storage_table = $auth_provider_oauth_token_storage_table;
|
||||||
$this->auth_provider_oauth_token_account_assoc = $auth_provider_oauth_token_account_assoc;
|
$this->auth_provider_oauth_token_account_assoc = $auth_provider_oauth_token_account_assoc;
|
||||||
$this->service_providers = $service_providers;
|
$this->service_providers = $service_providers;
|
||||||
$this->services = array();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -226,11 +218,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
*/
|
*/
|
||||||
protected function get_service($service_name, phpbb_auth_oauth_token_storage $storage, array $service_credentials, array $scopes = array())
|
protected function get_service($service_name, phpbb_auth_oauth_token_storage $storage, array $service_credentials, array $scopes = array())
|
||||||
{
|
{
|
||||||
if ($this->services[$service_name])
|
|
||||||
{
|
|
||||||
return $this->services[$service_name];
|
|
||||||
}
|
|
||||||
|
|
||||||
$current_uri = $this->get_current_uri();
|
$current_uri = $this->get_current_uri();
|
||||||
|
|
||||||
// Setup the credentials for the requests
|
// Setup the credentials for the requests
|
||||||
|
@ -241,8 +228,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||||
);
|
);
|
||||||
|
|
||||||
$service_factory = new \OAuth\ServiceFactory();
|
$service_factory = new \OAuth\ServiceFactory();
|
||||||
$this->service[$service_name] = $service_factory->createService($service_name, $credentials, $storage, $scopes);
|
return $service_factory->createService($service_name, $credentials, $storage, $scopes);
|
||||||
|
|
||||||
return $this->service[$service_name];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue