Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@gmail.com>2014-01-28 00:15:52 +0400
committerThomas Steur <thomas.steur@gmail.com>2014-01-28 00:15:52 +0400
commit80f254d87c8dbbd3efbaddd36f2428eb09397896 (patch)
tree96315753e7a26b70a4cab4456f46f85898220c37 /core/Auth.php
parent56bddb5325dab6b7ff3400c99208d08f454b6743 (diff)
refs #4565 migrate config super user to database
Diffstat (limited to 'core/Auth.php')
-rw-r--r--core/Auth.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/core/Auth.php b/core/Auth.php
index 9bf7433419..792acfa6f5 100644
--- a/core/Auth.php
+++ b/core/Auth.php
@@ -37,6 +37,21 @@ interface Auth
* Authenticates the user and initializes the session.
*/
public function initSession($login, $md5Password, $rememberMe);
+
+ /**
+ * Accessor to set authentication token. If set, you can authenticate the tokenAuth by calling the authenticate()
+ * method afterwards.
+ *
+ * @param string $token_auth authentication token
+ */
+ public function setTokenAuth($token_auth);
+
+ /**
+ * Accessor to set login name
+ *
+ * @param string $login user login
+ */
+ public function setLogin($login);
}
/**
@@ -118,6 +133,16 @@ class AuthResult
}
/**
+ * Returns true if the user has Super User access, false otherwise.
+ *
+ * @return bool
+ */
+ public function hasSuperUserAccess()
+ {
+ return $this->getCode() == self::SUCCESS_SUPERUSER_AUTH_CODE;
+ }
+
+ /**
* Returns true if this result was successfully authentication.
*
* @return bool