Release v3.12.0
✨ 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, andauth_form_hintsfor 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 byAuthHandler - 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/tomodems/{manufacturer}/{model}/fixtures/with newmodem.yamlschema 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
Noneinstead 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 requiredBASIC_HTTP- HTTP Basic authenticationFORM_PLAIN- Form POST with plain credentialsFORM_BASE64- Form POST with base64-encoded credentialsHNAP_SESSION- HNAP/SOAP challenge-response authenticationURL_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