iwf
    Preparing search index...

    Class BotPasswordAuth

    Bot Password authentication provider Uses MediaWiki Action API login with bot passwords

    Implements

    Index
    • Clears cached login state and tokens, forcing re-login on next request

      Returns void

      botAuth.clearCache();
      
    • Ensures the user is logged in to the specified site

      Parameters

      • site: string

        The site URL

      Returns Promise<void>

      Resolves when logged in

      await botAuth.ensureLoggedIn('https://en.wikipedia.org');
      
    • Get a CSRF token for the specified site

      Parameters

      • site: string

        The site URL

      Returns Promise<string>

      The CSRF token

      const csrfToken = await botAuth.getCsrfToken('https://en.wikipedia.org');