mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
- Extract DH key exchange crypto from pkg/service/spotify into new pkg/service/zeroconf package with exported functions and AuthTypeOAuthToken constant (both Spotify and Amazon use auth type 4) - Reduce pkg/service/spotify/zeroconf.go to thin wrappers around the shared package; public API (PushSpotifyCredentials, ZeroConfGetInfo) is preserved - Add pkg/service/amazon package mirroring the Spotify service with Amazon-specific differences: LWA endpoints, POST body credentials (not Basic Auth), user_id/name profile fields, amazon/accounts.json - Add PushAmazonCredentials delegating to shared zeroconf.PushCredentials Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
11 lines
528 B
Go
11 lines
528 B
Go
package amazon
|
|
|
|
import "github.com/gesellix/bose-soundtouch/pkg/service/zeroconf"
|
|
|
|
// PushAmazonCredentials pushes Amazon Music credentials to a speaker using the
|
|
// ZeroConf DH key exchange protocol. Falls back to simplified token push if
|
|
// the speaker does not support DH (older firmware).
|
|
// zcBaseURL is the base URL of the ZeroConf endpoint, e.g. "http://192.168.1.10:8200/zc".
|
|
func PushAmazonCredentials(zcBaseURL, username, accessToken string) error {
|
|
return zeroconf.PushCredentials(zcBaseURL, username, accessToken)
|
|
} |