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)
public function authenticate()
{
+ // Make sure Piwik session is started.
+ Session::start();
+
$user = '';
require_once PIWIK_INCLUDE_PATH . '/plugins/CASLogin/CAS/CAS.php';
{
$this->login = $login;
}
+ public function getLogin() {
+ return $this->login;
+ }
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.
)
);
}
-
+
+ // Those methods are required by Piwik API.
+ public function setPassword($password) {}
+ public function setPasswordHash($passwordHash) {}
}