diff options
Diffstat (limited to 'core/Auth.php')
-rw-r--r-- | core/Auth.php | 25 |
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 |