iwf
    Preparing search index...

    Class BotPasswordAuth

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

    Index

    Constructors

    Methods

    • 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');
      
    • Gets the axios instance (for use in upload operations)

      Returns AxiosInstance

      The axios instance

      const axiosInstance = botAuth.getAxiosInstance();
      
    • 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');
      
    • Gets the user agent string

      Returns string

      The user agent

      const userAgent = botAuth.getUserAgent();