mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[feature/oauth] Possible way of getting the login data to login_box()
PHPBB3-11673
This commit is contained in:
@@ -238,6 +238,22 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
*/
|
||||
public function get_login_data()
|
||||
{
|
||||
return array();
|
||||
$login_data = array();
|
||||
|
||||
foreach ($this->service_providers as $service_name => $service_provider)
|
||||
{
|
||||
// Only include data if the credentials are set
|
||||
$credentials = $service_provider->get_service_credentials();
|
||||
if ($credentials['key'] && $credentials['secret'])
|
||||
{
|
||||
$login_data[$service_provider] = array();
|
||||
|
||||
// Build the redirect url for the box
|
||||
$redirect_url = build_url(false) . '&oauth_service=' . $service_name;
|
||||
$login_data[$service_provider]['url'] = redirect($redirect_url, true);
|
||||
}
|
||||
}
|
||||
|
||||
return $login_data;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user