diff --git a/plugins/sociallogin/facebook/facebook.php b/plugins/sociallogin/facebook/facebook.php index 9e1d8d0..c9db5ab 100644 --- a/plugins/sociallogin/facebook/facebook.php +++ b/plugins/sociallogin/facebook/facebook.php @@ -77,20 +77,6 @@ protected function getConnector() return $this->connector; } - /** - * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. - * - * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] - * - * @throws Exception - */ - protected function getToken() - { - $oauthConnector = $this->getConnector(); - - return [$oauthConnector->authenticate(), $oauthConnector]; - } - /** * Get the raw user profile information from the social network. * diff --git a/plugins/sociallogin/github/github.php b/plugins/sociallogin/github/github.php index 78b31d3..37abb0d 100644 --- a/plugins/sociallogin/github/github.php +++ b/plugins/sociallogin/github/github.php @@ -76,20 +76,6 @@ protected function getConnector() return $this->connector; } - /** - * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. - * - * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] - * - * @throws Exception - */ - protected function getToken() - { - $oauthConnector = $this->getConnector(); - - return [$oauthConnector->authenticate(), $oauthConnector]; - } - /** * Get the raw user profile information from the social network. * diff --git a/plugins/sociallogin/linkedin/linkedin.php b/plugins/sociallogin/linkedin/linkedin.php index a911896..4edcf43 100644 --- a/plugins/sociallogin/linkedin/linkedin.php +++ b/plugins/sociallogin/linkedin/linkedin.php @@ -79,20 +79,6 @@ protected function getConnector() return $this->connector; } - /** - * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. - * - * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] - * - * @throws Exception - */ - protected function getToken() - { - $connector = $this->getConnector(); - - return [$connector->authenticate(), $connector]; - } - /** * Get the raw user profile information from the social network. * diff --git a/plugins/sociallogin/microsoft/microsoft.php b/plugins/sociallogin/microsoft/microsoft.php index 35cbd56..4fe724c 100644 --- a/plugins/sociallogin/microsoft/microsoft.php +++ b/plugins/sociallogin/microsoft/microsoft.php @@ -79,20 +79,6 @@ protected function getConnector() return $this->connector; } - /** - * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. - * - * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] - * - * @throws Exception - */ - protected function getToken() - { - $connector = $this->getConnector(); - - return [$connector->authenticate(), $connector]; - } - /** * Get the raw user profile information from the social network. * diff --git a/plugins/sociallogin/twitter/twitter.php b/plugins/sociallogin/twitter/twitter.php index efc0bf3..d7b770a 100644 --- a/plugins/sociallogin/twitter/twitter.php +++ b/plugins/sociallogin/twitter/twitter.php @@ -96,20 +96,6 @@ protected function getLoginButtonURL() return Uri::base() . 'index.php?option=com_ajax&group=system&plugin=sociallogin&format=raw&akaction=authenticate&encoding=redirect&slug=' . $this->integrationName . '&' . $token . '=1'; } - /** - * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. - * - * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] - * - * @throws Exception - */ - protected function getToken() - { - $connector = $this->getConnector(); - - return [$connector->authenticate(), $connector]; - } - /** * Get the raw user profile information from the social network. * diff --git a/plugins/system/sociallogin/Library/Plugin/AbstractPlugin.php b/plugins/system/sociallogin/Library/Plugin/AbstractPlugin.php index 26b7b1c..9785940 100644 --- a/plugins/system/sociallogin/Library/Plugin/AbstractPlugin.php +++ b/plugins/system/sociallogin/Library/Plugin/AbstractPlugin.php @@ -203,8 +203,15 @@ protected function getLinkButtonURL() * Get the OAuth / OAuth2 token from the social network. Used in the onAjax* handler. * * @return array|bool False if we could not retrieve it. Otherwise [$token, $connector] + * + * @throws Exception */ - protected abstract function getToken(); + protected function getToken() + { + $oauthConnector = $this->getConnector(); + + return [$oauthConnector->authenticate(), $oauthConnector]; + } /** * Get the raw user profile information from the social network.