diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-13 23:47:16 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-07-14 14:22:43 -0400 |
commit | a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d (patch) | |
tree | 9e95e3aec099aa8ab74850e5831ed10f0477e8e5 /phpBB | |
parent | 6e73ccd00f363917de2914de3b8c75d296cdb355 (diff) | |
download | forums-a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d.tar forums-a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d.tar.gz forums-a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d.tar.bz2 forums-a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d.tar.xz forums-a7bfe5eeeb1250c96fb2ddb1ee19f1babe72fe3d.zip |
[feature/oauth] Changes to oauth
PHPBB3-11673
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/auth/provider/oauth.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/phpBB/includes/auth/provider/oauth.php b/phpBB/includes/auth/provider/oauth.php index c59c573c52..d405bb77b1 100644 --- a/phpBB/includes/auth/provider/oauth.php +++ b/phpBB/includes/auth/provider/oauth.php @@ -104,6 +104,7 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base { return array( 'status' => LOGIN_ERROR_EXTERNAL_AUTH, + // TODO: change error message 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE', 'user_row' => array('user_id' => ANONYMOUS), ); @@ -117,11 +118,14 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base { return array( 'status' => LOGIN_ERROR_EXTERNAL_AUTH, + // TODO: change error message 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH_APACHE', 'user_row' => array('user_id' => ANONYMOUS), ); } + $storage = new phpbb_auth_oauth_token_storage($this->db, $this->user, $service_name, $this->auth_provider_oauth_table); + if ($this->request->is_set('code', phpbb_request_interface::GET)) { // Second pass: request access token, authenticate with phpBB @@ -175,20 +179,19 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base * Returns the cached service object or creates a new one * * @param string $service_name The name of the service + * @param phpbb_auth_oauth_token_storage $storage * @param array $service_credentials {@see phpbb_auth_provider_oauth::get_service_credentials} * @param array $scope The scope of the request against * the api. * @return \OAuth\Common\Service\ServiceInterface */ - protected function get_service($service_name, 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]; } - $storage = new phpbb_auth_oauth_token_storage($this->db, $this->user, $service_name, $this->auth_provider_oauth_table); - $current_uri = $this->get_current_uri(); // Setup the credentials for the requests |