mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 12:14:06 +02:00
[feature/oauth] Create OAuth service classes
PHPBB3-11673
This commit is contained in:
@@ -220,37 +220,6 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
|
||||
return $this->service[$service_name];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the scopes of the service required for authentication
|
||||
*
|
||||
* @param string $service_name
|
||||
* @return array An array of the scopes required from the service
|
||||
*/
|
||||
protected function get_scopes($service_name)
|
||||
{
|
||||
$scopes = array();
|
||||
|
||||
switch ($service_name)
|
||||
{
|
||||
case 'GitHub':
|
||||
$scopes[] = 'user';
|
||||
break;
|
||||
case 'google':
|
||||
$scopes[] = 'userinfo_email';
|
||||
$scopes[] = 'userinfo_profile';
|
||||
break;
|
||||
case 'instagram':
|
||||
case 'microsoft':
|
||||
$scopes[] = 'basic';
|
||||
break;
|
||||
case 'linkedin':
|
||||
$scopes[] = 'r_basicprofile';
|
||||
break;
|
||||
}
|
||||
|
||||
return $scopes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the path desired of the service
|
||||
*
|
||||
|
Reference in New Issue
Block a user