mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/oauth] Get service credentials on each OAuth service
PHPBB3-11673
This commit is contained in:
parent
55cdc874e6
commit
6a2871692c
19 changed files with 201 additions and 12 deletions
|
@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_amazon extends phpbb_auth_provider_oauth
|
||||||
'profile',
|
'profile',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_amazon_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_amazon_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_bitly extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_bitly_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_bitly_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_box extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_box extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_box_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_box_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_dropbox extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_dropbox extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_dropbox_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_dropbox_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_facebook extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_facebook_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_facebook_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,16 @@ if (!defined('IN_PHPBB'))
|
||||||
*
|
*
|
||||||
* @package auth
|
* @package auth
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_box extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_fitbit extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_fitbit_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_fitbit_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_foursquare extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_foursquare extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_foursquare_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_foursquare_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_github extends phpbb_auth_provider_oauth
|
||||||
'user',
|
'user',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_github_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_github_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,4 +32,15 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
|
||||||
'userinfo_profile',
|
'userinfo_profile',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_google_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_google_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_instagram extends phpbb_auth_provider_oa
|
||||||
'basic',
|
'basic',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_instagram_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_instagram_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,4 +28,17 @@ interface phpbb_auth_provider_oauth_service_interface
|
||||||
* @return array An array of the required scopes
|
* @return array An array of the required scopes
|
||||||
*/
|
*/
|
||||||
public function get_auth_scope();
|
public function get_auth_scope();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an array containing the service credentials belonging to requested
|
||||||
|
* service.
|
||||||
|
*
|
||||||
|
* @return array An array containing the 'key' and the 'secret' of the
|
||||||
|
* service in the form:
|
||||||
|
* array(
|
||||||
|
* 'key' => string
|
||||||
|
* 'secret' => string
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function get_service_credentials();
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_linkedin extends phpbb_auth_provider_oau
|
||||||
'r_basicprofile',
|
'r_basicprofile',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_linkedin_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_linkedin_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_microsoft extends phpbb_auth_provider_oa
|
||||||
'basic',
|
'basic',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_microsoft_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_microsoft_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,4 +33,15 @@ class phpbb_auth_provider_oauth_service_paypal extends phpbb_auth_provider_oauth
|
||||||
'email',
|
'email',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_paypal_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_paypal_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_soundcloud extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_soundcloud extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_soundcloud_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_soundcloud_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_tumblr extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_tumblr extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_tumblr_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_tumblr_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_twitter extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_twitter extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_twitter_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_twitter_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_vkontakte extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_vkontakte extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_vkontakte_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_vkontakte_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
|
||||||
*/
|
*/
|
||||||
class phpbb_auth_provider_oauth_service_yammer extends phpbb_auth_provider_oauth_service_base
|
class phpbb_auth_provider_oauth_service_yammer extends phpbb_auth_provider_oauth_service_base
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function get_service_credentials()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
'key' => $this->config['auth_oauth_yammer_key'],
|
||||||
|
'secret' => $this->config['auth_oauth_yammer_secret'],
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue