From e91b73e62d32a031625651133a51e9310cfcadbf Mon Sep 17 00:00:00 2001
From: Joseph Warner <hardolaf@hardolaf.com>
Date: Mon, 29 Jul 2013 16:12:36 -0400
Subject: [feature/oauth] Update the auth interface

PHPBB3-11673
---
 phpBB/phpbb/auth/provider/base.php      | 16 ++++++++++++++++
 phpBB/phpbb/auth/provider/interface.php | 20 ++++++++++++++++++++
 2 files changed, 36 insertions(+)

(limited to 'phpBB/phpbb/auth')

diff --git a/phpBB/phpbb/auth/provider/base.php b/phpBB/phpbb/auth/provider/base.php
index 7eaf8bb2d3..ca1c635b15 100644
--- a/phpBB/phpbb/auth/provider/base.php
+++ b/phpBB/phpbb/auth/provider/base.php
@@ -69,4 +69,20 @@ abstract class phpbb_auth_provider_base implements phpbb_auth_provider_interface
 	{
 		return;
 	}
+
+	/**
+	* {@inheritdoc}
+	*/
+	public function login_link_has_necessary_data($login_link_data)
+	{
+		return;
+	}
+
+	/**
+	* {@inheritdoc}
+	*/
+	public function link_account(array $link_data)
+	{
+		return;
+	}
 }
diff --git a/phpBB/phpbb/auth/provider/interface.php b/phpBB/phpbb/auth/provider/interface.php
index 9cee63abeb..a2d57a6917 100644
--- a/phpBB/phpbb/auth/provider/interface.php
+++ b/phpBB/phpbb/auth/provider/interface.php
@@ -125,4 +125,24 @@ interface phpbb_auth_provider_interface
 	 * 					session should be closed, or null if not implemented.
 	 */
 	public function validate_session($user);
+
+	/**
+	* Checks to see if $login_link_data contains all information except for the
+	* user_id of an account needed to successfully link an external account to
+	* a forum account.
+	*
+	* @param	array	$link_data	Any data needed to link a phpBB account to
+	*								an external account.
+	* @return	string|null	Returns a string with a language constant if there
+	*						is data missing or null if there is no error.
+	*/
+	public function login_link_has_necessary_data($login_link_data);
+
+	/**
+	* Links an external account to a phpBB account.
+	*
+	* @param	array	$link_data	Any data needed to link a phpBB account to
+	*								an external account.
+	*/
+	public function link_account(array $link_data);
 }
-- 
cgit v1.2.1