1
0
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:
Joseph Warner
2013-07-14 15:16:34 -04:00
parent 00d0e10200
commit 947aa2b6b4
16 changed files with 442 additions and 31 deletions

View File

@@ -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
*