Skip to content

Release v3.12.0

Choose a tag to compare

@github-actions github-actions released this 20 Jan 15:19
c9112f7

✨ Auth Strategy Discovery

v3.12.0 introduces Auth Strategy Discovery, a major architectural improvement that automatically detects and stores authentication requirements during initial setup. This eliminates hard-coded parser-specific authentication logic and improves reliability for modems with firmware variants.

Added

  • Auth Strategy Discovery - During config flow, the integration now probes the modem to discover which authentication method works (Basic HTTP, Form-based, HNAP/SOAP, URL Token, or No Auth)
  • Stored Auth Configuration - The discovered auth strategy is stored in config entry and reused during polling, ensuring consistent authentication
  • Parser Hints - Parsers now provide hnap_hints, js_auth_hints, and auth_form_hints for auth discovery
  • AuthHandler Improvements - All authentication is now handled centrally by AuthHandler, not individual parsers

Changed

  • BREAKING (Internal): Parsers no longer implement login() method directly. All auth is handled by AuthHandler
  • SB8200 Auth: URL token authentication now uses session cookies instead of parser-stored tokens
  • S33/MB8611 HNAP: HNAP builder is now created by AuthHandler and transferred to parser for data fetches
  • Fixture Organization: Modem fixtures moved from tests/parsers/ to modems/{manufacturer}/{model}/fixtures/ with new modem.yaml schema for declarative modem configuration

Fixed

  • SB6190 Auth Detection - Combined credential forms with visible password fields now detected correctly (#83, #93)
  • Form Auth Response Handling - Auth handler now returns None instead of form response HTML, allowing scraper to fetch actual data pages
  • Invalid Auth Error Display - Bad credentials now show "Invalid username or password" instead of misleading "Cannot connect" error
  • Options Flow Auth Handling - Options/reconfigure flow now properly catches authentication errors
  • Polling Log Noise - Detection and connection success logs demoted from INFO to DEBUG (only visible when debugging enabled)
  • Misleading Parser Names - Removed parser name from connection log that incorrectly showed URL pattern source instead of detected modem

Improved

  • Error Messages - Simplified authentication error message across all 12 languages
  • Conditional Logging - Config flow uses verbose logging (INFO) for setup visibility, polling uses quiet logging (DEBUG) for normal operation

Technical Details

Auth strategies supported:

  • NO_AUTH - No authentication required
  • BASIC_HTTP - HTTP Basic authentication
  • FORM_PLAIN - Form POST with plain credentials
  • FORM_BASE64 - Form POST with base64-encoded credentials
  • HNAP_SESSION - HNAP/SOAP challenge-response authentication
  • URL_TOKEN_SESSION - URL-based token with session cookies

What's Changed

  • v3.12.0: Auth Strategy Discovery by @kwschulz in #99
  • fix(ci): release workflow uses pytest.ini testpaths by @kwschulz in #100

Full Changelog: v3.11.0...v3.12.0