@hrefcl/apidoc - v4.0.5
    Preparing search index...
    • Parser for auth tags - defines MQTT authentication requirements

      This parser handles the auth tag that defines authentication methods and requirements for MQTT connections. It extracts:

      • Authentication type (username, tls, apikey, etc.)
      • Optional authentication details and requirements

      Parameters

      • content: string

        Raw content from the auth tag

      Returns { type: string; details: string }

      Parsed authentication information with type and details, or null if parsing fails

      // Input: "username Device credentials with TLS recommended"
      // Output: { type: "username", details: "Device credentials with TLS recommended" }
      // Input: "tls mTLS client certificate authentication"
      // Output: { type: "tls", details: "mTLS client certificate authentication" }
      // Input: "apikey Bearer token in username field"
      // Output: { type: "apikey", details: "Bearer token in username field" }
      // Input: "none Public topic, no authentication required"
      // Output: { type: "none", details: "Public topic, no authentication required" }

      4.1.0