aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider/oauth/oauth.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-07-29 13:10:56 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-07-29 13:11:15 -0400
commitc09bda10fcf3fc7b84908bc15d86eca86b71f232 (patch)
tree9da80f0d7b14890f922702a113fb87b6b9753335 /phpBB/phpbb/auth/provider/oauth/oauth.php
parentbcdeafedd7178d27dcd0fafd4b22cddeaefc80b0 (diff)
downloadforums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.gz
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.bz2
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.tar.xz
forums-c09bda10fcf3fc7b84908bc15d86eca86b71f232.zip
[feature/oauth] Properly check that all data needed is available
PHPBB3-11673
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth/oauth.php')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/oauth.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/oauth.php b/phpBB/phpbb/auth/provider/oauth/oauth.php
index a8b55fc532..eaa111d194 100644
--- a/phpBB/phpbb/auth/provider/oauth/oauth.php
+++ b/phpBB/phpbb/auth/provider/oauth/oauth.php
@@ -337,4 +337,22 @@ class phpbb_auth_provider_oauth extends phpbb_auth_provider_base
return $ret;
}
+
+ /**
+ * {@inheritdoc}
+ */
+ public function login_link_has_necessary_data($login_link_data)
+ {
+ if (empty($login_link_data))
+ {
+ return 'LOGIN_LINK_NO_DATA_PROVIDED';
+ }
+
+ if (!array_key_exists('oauth_service', $login_link_data) || !$login_link_data['oauth_service'])
+ {
+ return 'LOGIN_LINK_MISSING_DATA';
+ }
+
+ return null;
+ }
}