src/Auth/AuthAPI.php
private function checkIfTokenIsValidAndUpdateTheExpireDate() {
        $userInfo = $this->authModel->getRoleAndUserFromToken($this->token);
        if ($userInfo === false) {
            throw new AuthException('The token is not valid', 2000);
        }
        if ($userInfo['expire'] !== null &&
                $userInfo['expire'] < $userInfo['db_date']) {
            throw new AuthException('The token expires', 2001);
        }
        if ($userInfo['expire'] !== null) {
            $futureExpiredate = date('Y-m-d H:i:s',
                    strtotime($userInfo['db_date']) + $this->config->get('auth')['sessionTimeLife']
                    * 60);
            $this->authModel->updateExpireDate($this->token, $futureExpiredate);
        }
        return $userInfo;
    }
private function checkIfTokenIsValidAndUpdateTheExpireDate() {
        $userInfo = $this->authModel->getRoleAndUserFromToken($this->token);
        if ($userInfo === false) {
            throw new AuthException('The token is not valid', 2000);
        }
        if ($userInfo['expire'] !== null &&
                $userInfo['expire'] < $userInfo['db_date']) {
            throw new AuthException('The token expires', 2001);
        }
        if ($userInfo['expire'] !== null) {
            $futureExpiredate = date('Y-m-d H:i:s',
                    strtotime($userInfo['db_date']) + $this->config->get('auth')['sessionTimeLife']
                    * 60);
            $this->authModel->updateExpireDate($this->token, $futureExpiredate);
        }
        return $userInfo;
    }
Check if token is valid, if not throws and error.

@throws MmfAuthException