diff options
Diffstat (limited to 'phpBB/phpbb/auth/provider')
| -rw-r--r-- | phpBB/phpbb/auth/provider/oauth/oauth.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php index 978c84cd6d..a2d5c3fcd5 100644 --- a/phpBB/phpbb/auth/provider/oauth/oauth.php +++ b/phpBB/phpbb/auth/provider/oauth/oauth.php @@ -106,6 +106,24 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base /** * {@inheritdoc} */ + public function init() + { + // This does not test whether or not the key and secret provided are valid. + foreach ($this->service_providers as $service_provider) + { + $credentials = $service_provider->get_service_credentials(); + + if (($credentials['key'] && !$credentials['secret']) || (!$credentials['key'] && $credentials['secret'])) + { + return $this->user->lang['AUTH_PROVIDER_OAUTH_ERROR_ELEMENT_MISSING']; + } + } + return false; + } + + /** + * {@inheritdoc} + */ public function login($username, $password) { // Temporary workaround for only having one authentication provider available |
