fnp
/
piwik-CASLogin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure Piwik session is started in Auth::authenticate
[piwik-CASLogin.git]
/
Auth.php
diff --git
a/Auth.php
b/Auth.php
index
c2d9446
..
de6453a
100644
(file)
--- a/
Auth.php
+++ b/
Auth.php
@@
-18,6
+18,7
@@
use Piwik\Config;
use Piwik\Db;
use Piwik\Piwik;
use Piwik\Plugins\UsersManager\API;
use Piwik\Db;
use Piwik\Piwik;
use Piwik\Plugins\UsersManager\API;
+use Piwik\Session;
/**
* Class that implements an authentication mechanism via CAS (Central Authentication Services)
/**
* Class that implements an authentication mechanism via CAS (Central Authentication Services)
@@
-39,6
+40,9
@@
class Auth implements \Piwik\Auth
public function authenticate()
{
public function authenticate()
{
+ // Make sure Piwik session is started.
+ Session::start();
+
$user = '';
require_once PIWIK_INCLUDE_PATH . '/plugins/CASLogin/CAS/CAS.php';
$user = '';
require_once PIWIK_INCLUDE_PATH . '/plugins/CASLogin/CAS/CAS.php';
@@
-134,11
+138,17
@@
class Auth implements \Piwik\Auth
{
$this->login = $login;
}
{
$this->login = $login;
}
+ public function getLogin() {
+ return $this->login;
+ }
public function setTokenAuth($token_auth)
{
$this->token_auth = $token_auth;
}
public function setTokenAuth($token_auth)
{
$this->token_auth = $token_auth;
}
+ public function getTokenAuthSecret() {
+ return $this->token_auth;
+ }
/**
* This method is used to inject user into Piwik's tables.
/**
* This method is used to inject user into Piwik's tables.
@@
-197,6
+207,9
@@
class Auth implements \Piwik\Auth
)
);
}
)
);
}
-
+
+ // Those methods are required by Piwik API.
+ public function setPassword($password) {}
+ public function setPasswordHash($passwordHash) {}
}
}