mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Replace the simplified tokenType=accesstoken push with the full Spotify Connect ZeroConf protocol: GET getInfo to fetch the speaker's 768-bit DH public key, derive AES-128-CTR + HMAC-SHA1 keys from the shared secret, and POST an encrypted LoginCredentials protobuf blob. Speakers that receive a proper blob can self-refresh their Spotify session independently, eliminating the need for periodic re-priming on token expiry. Falls back to the raw token approach automatically when getInfo fails, preserving compatibility with older firmware. SHA1 is mandated by the Spotify Connect ZeroConf protocol spec for DH key derivation. This cannot be changed without breaking protocol compatibility. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>