aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/auth/provider/oauth/service/interface.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-10 15:48:29 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-10 15:48:29 -0700
commitfc1dfd779da37128382322ffdc75bf751a0834a3 (patch)
tree5d43d1847832169510c55c3358c42ccd095b2128 /phpBB/phpbb/auth/provider/oauth/service/interface.php
parent71aeec40f6c4c5e6a69699486b618c2ba67dff2d (diff)
parent18f6a161017f5350d9487181f4b4ed66a53a0284 (diff)
downloadforums-fc1dfd779da37128382322ffdc75bf751a0834a3.tar
forums-fc1dfd779da37128382322ffdc75bf751a0834a3.tar.gz
forums-fc1dfd779da37128382322ffdc75bf751a0834a3.tar.bz2
forums-fc1dfd779da37128382322ffdc75bf751a0834a3.tar.xz
forums-fc1dfd779da37128382322ffdc75bf751a0834a3.zip
Merge remote-tracking branch 'Hardolaf/feature/oauth' into develop
Diffstat (limited to 'phpBB/phpbb/auth/provider/oauth/service/interface.php')
-rw-r--r--phpBB/phpbb/auth/provider/oauth/service/interface.php77
1 files changed, 77 insertions, 0 deletions
diff --git a/phpBB/phpbb/auth/provider/oauth/service/interface.php b/phpBB/phpbb/auth/provider/oauth/service/interface.php
new file mode 100644
index 0000000000..3bba7c0e2c
--- /dev/null
+++ b/phpBB/phpbb/auth/provider/oauth/service/interface.php
@@ -0,0 +1,77 @@
+<?php
+/**
+*
+* @package auth
+* @copyright (c) 2013 phpBB Group
+* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
+*
+*/
+
+/**
+* @ignore
+*/
+if (!defined('IN_PHPBB'))
+{
+ exit;
+}
+
+/**
+* OAuth service interface
+*
+* @package auth
+*/
+interface phpbb_auth_provider_oauth_service_interface
+{
+ /**
+ * Returns an array of the scopes necessary for auth
+ *
+ * @return array An array of the required scopes
+ */
+ public function get_auth_scope();
+
+ /**
+ * Returns the external library service provider once it has been set
+ *
+ * @param \OAuth\Common\Service\ServiceInterface|null
+ */
+ public function get_external_service_provider();
+
+ /**
+ * 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();
+
+ /**
+ * Returns the results of the authentication in json format
+ *
+ * @throws phpbb_auth_provider_oauth_service_exception
+ * @return string The unique identifier returned by the service provider
+ * that is used to authenticate the user with phpBB.
+ */
+ public function perform_auth_login();
+
+ /**
+ * Returns the results of the authentication in json format
+ * Use this function when the user already has an access token
+ *
+ * @throws phpbb_auth_provider_oauth_service_exception
+ * @return string The unique identifier returned by the service provider
+ * that is used to authenticate the user with phpBB.
+ */
+ public function perform_token_auth();
+
+ /**
+ * Sets the external library service provider
+ *
+ * @param \OAuth\Common\Service\ServiceInterface $service
+ */
+ public function set_external_service_provider(\OAuth\Common\Service\ServiceInterface $service_provider);
+}