summaryrefslogtreecommitdiff
path: root/app/Controller/Oauth.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controller/Oauth.php')
-rw-r--r--app/Controller/Oauth.php46
1 files changed, 8 insertions, 38 deletions
diff --git a/app/Controller/Oauth.php b/app/Controller/Oauth.php
index ed901def..452faecd 100644
--- a/app/Controller/Oauth.php
+++ b/app/Controller/Oauth.php
@@ -11,36 +11,6 @@ namespace Kanboard\Controller;
class Oauth extends Base
{
/**
- * Link or authenticate a Google account
- *
- * @access public
- */
- public function google()
- {
- $this->step1('Google');
- }
-
- /**
- * Link or authenticate a Github account
- *
- * @access public
- */
- public function github()
- {
- $this->step1('Github');
- }
-
- /**
- * Link or authenticate a Gitlab account
- *
- * @access public
- */
- public function gitlab()
- {
- $this->step1('Gitlab');
- }
-
- /**
* Unlink external account
*
* @access public
@@ -65,7 +35,7 @@ class Oauth extends Base
* @access private
* @param string $provider
*/
- private function step1($provider)
+ protected function step1($provider)
{
$code = $this->request->getStringParam('code');
@@ -79,11 +49,11 @@ class Oauth extends Base
/**
* Link or authenticate the user
*
- * @access private
+ * @access protected
* @param string $provider
* @param string $code
*/
- private function step2($provider, $code)
+ protected function step2($provider, $code)
{
$this->authenticationManager->getProvider($provider)->setCode($code);
@@ -97,10 +67,10 @@ class Oauth extends Base
/**
* Link the account
*
- * @access private
+ * @access protected
* @param string $provider
*/
- private function link($provider)
+ protected function link($provider)
{
$authProvider = $this->authenticationManager->getProvider($provider);
@@ -117,15 +87,15 @@ class Oauth extends Base
/**
* Authenticate the account
*
- * @access private
+ * @access protected
* @param string $provider
*/
- private function authenticate($provider)
+ protected function authenticate($provider)
{
if ($this->authenticationManager->oauthAuthentication($provider)) {
$this->response->redirect($this->helper->url->to('app', 'index'));
} else {
- $this->response->html($this->template->layout('auth/index', array(
+ $this->response->html($this->helper->layout->app('auth/index', array(
'errors' => array('login' => t('External authentication failed')),
'values' => array(),
'no_layout' => true,