aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-14 16:00:41 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-14 16:00:41 -0400
commit6a2871692cb9b2e9027b026604e8f456f17d1b44 (patch)
tree5d07bf13b5f3522dea0df2553df0265c59015968 /phpBB/phpbb/auth
parent55cdc874e6519242f7031de034df8d8c00ae283f (diff)
downloadforums-6a2871692cb9b2e9027b026604e8f456f17d1b44.tar
forums-6a2871692cb9b2e9027b026604e8f456f17d1b44.tar.gz
forums-6a2871692cb9b2e9027b026604e8f456f17d1b44.tar.bz2
forums-6a2871692cb9b2e9027b026604e8f456f17d1b44.tar.xz
forums-6a2871692cb9b2e9027b026604e8f456f17d1b44.zip
[feature/oauth] Get service credentials on each OAuth service
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/amazon.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/bitly.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/box.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/dropbox.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/facebook.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/fitbit.php13
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/foursqare.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/github.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/google.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/instagram.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/interface.php13
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/linkedin.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/microsoft.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/paypal.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/soundcloud.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/tumblr.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/twitter.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/vkontakte.php11
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/yammer.php11
19 files changed, 201 insertions, 12 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/service/amazon.php b/phpBB/phpbb/auth/provider/oauth/service/amazon.php
index cea4438323..740add0f3c 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/amazon.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/amazon.php
@@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_amazon extends phpbb_auth_provider_oauth
'profile',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_amazon_key'],
+ 'secret' => $this->config['auth_oauth_amazon_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/bitly.php b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
index 23769b36a5..1de3183b84 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/bitly.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/bitly.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/box.php b/phpBB/phpbb/auth/provider/oauth/service/box.php
index cfa788da4d..19e409a943 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/box.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/box.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/dropbox.php b/phpBB/phpbb/auth/provider/oauth/service/dropbox.php
index 655c4305f3..3b4920bb0e 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/dropbox.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/dropbox.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/facebook.php b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
index 723c8f09f2..0652028bf8 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/facebook.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/facebook.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/fitbit.php b/phpBB/phpbb/auth/provider/oauth/service/fitbit.php
index a0f63a40e7..d75b971fcf 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/fitbit.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/fitbit.php
@@ -20,7 +20,16 @@ if (!defined('IN_PHPBB'))
*
* @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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/foursqare.php b/phpBB/phpbb/auth/provider/oauth/service/foursqare.php
index 9eb868b1c4..d03725bcfd 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/foursqare.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/foursqare.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/github.php b/phpBB/phpbb/auth/provider/oauth/service/github.php
index 1eddb26906..30d23b0e4f 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/github.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/github.php
@@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_github extends phpbb_auth_provider_oauth
'user',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_github_key'],
+ 'secret' => $this->config['auth_oauth_github_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/google.php b/phpBB/phpbb/auth/provider/oauth/service/google.php
index d72c66ac5e..50cfee86e0 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/google.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/google.php
@@ -32,4 +32,15 @@ class phpbb_auth_provider_oauth_service_google extends phpbb_auth_provider_oauth
'userinfo_profile',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_google_key'],
+ 'secret' => $this->config['auth_oauth_google_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/instagram.php b/phpBB/phpbb/auth/provider/oauth/service/instagram.php
index c40acf9507..ae30d2d0b6 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/instagram.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/instagram.php
@@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_instagram extends phpbb_auth_provider_oa
'basic',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_instagram_key'],
+ 'secret' => $this->config['auth_oauth_instagram_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/interface.php b/phpBB/phpbb/auth/provider/oauth/service/interface.php
index c79413ee3a..80f2ee7259 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/interface.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/interface.php
@@ -28,4 +28,17 @@ interface phpbb_auth_provider_oauth_service_interface
* @return array An array of the required scopes
*/
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();
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/linkedin.php b/phpBB/phpbb/auth/provider/oauth/service/linkedin.php
index 118379b4ab..3231270cff 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/linkedin.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/linkedin.php
@@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_linkedin extends phpbb_auth_provider_oau
'r_basicprofile',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_linkedin_key'],
+ 'secret' => $this->config['auth_oauth_linkedin_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/microsoft.php b/phpBB/phpbb/auth/provider/oauth/service/microsoft.php
index 0ad2a5173b..7fb47f45fc 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/microsoft.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/microsoft.php
@@ -31,4 +31,15 @@ class phpbb_auth_provider_oauth_service_microsoft extends phpbb_auth_provider_oa
'basic',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_microsoft_key'],
+ 'secret' => $this->config['auth_oauth_microsoft_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/paypal.php b/phpBB/phpbb/auth/provider/oauth/service/paypal.php
index 26038d4fcb..48b361921a 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/paypal.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/paypal.php
@@ -33,4 +33,15 @@ class phpbb_auth_provider_oauth_service_paypal extends phpbb_auth_provider_oauth
'email',
);
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function get_service_credentials()
+ {
+ return array(
+ 'key' => $this->config['auth_oauth_paypal_key'],
+ 'secret' => $this->config['auth_oauth_paypal_secret'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/soundcloud.php b/phpBB/phpbb/auth/provider/oauth/service/soundcloud.php
index 0b5de5af20..e000c68a6f 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/soundcloud.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/soundcloud.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/tumblr.php b/phpBB/phpbb/auth/provider/oauth/service/tumblr.php
index be4871322c..2098cc92e1 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/tumblr.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/tumblr.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/twitter.php b/phpBB/phpbb/auth/provider/oauth/service/twitter.php
index e58b02fa41..57d07e1c15 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/twitter.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/twitter.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/vkontakte.php b/phpBB/phpbb/auth/provider/oauth/service/vkontakte.php
index f6398a137d..6b43bf39d8 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/vkontakte.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/vkontakte.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}
diff --git a/phpBB/phpbb/auth/provider/oauth/service/yammer.php b/phpBB/phpbb/auth/provider/oauth/service/yammer.php
index 4cbc153329..13c638def7 100644
--- a/phpBB/phpbb/auth/provider/oauth/service/yammer.php
+++ b/phpBB/phpbb/auth/provider/oauth/service/yammer.php
@@ -22,5 +22,14 @@ if (!defined('IN_PHPBB'))
*/
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'],
+ );
+ }
}