public function createAuthToken(
        $login,
        $password,
        $jwtWrapper,
        $expires = 1200,
        $updateUserInfo = [],
        $updateTokenInfo = []
    ) {
        if (!isset($login) || !isset($password)) {
            throw new InvalidArgumentException('Neither username or password can be empty!');
        }

        $user = $this->isValidUser($login, $password);
        if (is_null($user)) {
            throw new UserNotFoundException('User not found');
        }

        foreach ($updateUserInfo as $key => $value) {
            $user->set($key, $value);
        }

        $updateTokenInfo['login'] = $login;
        $updateTokenInfo['userid'] = $user->getUserid();
        $jwtData = $jwtWrapper->createJwtData(
            $updateTokenInfo,
            $expires
        );

        $token = $jwtWrapper->generateToken($jwtData);

        $user->set('TOKEN_HASH', sha1($token));
        $this->save($user);

        return $token;
    }