Skip to content

Add optional HTTP Basic Authentication for Subsonic servers - #773

Open
ktims wants to merge 2 commits into
supersonic-app:mainfrom
ktims:http-basic-auth
Open

Add optional HTTP Basic Authentication for Subsonic servers#773
ktims wants to merge 2 commits into
supersonic-app:mainfrom
ktims:http-basic-auth

Conversation

@ktims

@ktims ktims commented Nov 29, 2025

Copy link
Copy Markdown

Related to #765 . Adds a selectable option for Subsonic servers to (also) send the username/password in an HTTP Basic Auth header. This is useful when Proxy Authentication is used in front of the Subsonic server.

The implementation adds a new OnServerAuthChange callback to the ServerManager. The callback is called on server change with a map of headers to be added to HTTP requests (allowing flexibility for potential future use cases, e.g. Oauth2 authentication). Hooks are added to playbackEngine and AudioCache to configure their respective HTTP clients appropriately.

Note: This depends on the parallel PR to go-subsonic, and go.mod needs to be updated to reflect the merge commit over there.

Comment thread backend/player/player.go
BasePlayer
PlayFile(url string, metadata mediaprovider.MediaItemMetadata, startTime float64) error
SetNextFile(url string, metadata mediaprovider.MediaItemMetadata) error
SetHeaders(headers map[string]string) error

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will need to implement this in the DLNA player as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants