Documentation
¶
Overview ¶
Package config resolves settings from flags, environment and config file.
Index ¶
Constants ¶
const DefaultRedirectURI = "http://127.0.0.1:8888/callback"
DefaultRedirectURI is the loopback callback `spotify auth login` listens on.
It must be registered verbatim in the Spotify dashboard. Spotify requires HTTPS for redirect URIs with one exception — a loopback IP literal — so this is 127.0.0.1 and not localhost, which the dashboard rejects.
Variables ¶
This section is empty.
Functions ¶
func CallbackAddr ¶
CallbackAddr returns the host:port and path the login server should listen on.
The redirect URI is what Spotify sends the browser back to, so the listener has to match it exactly — parsing it here keeps the two from drifting when someone registers a different port.
Types ¶
type Config ¶
Config holds resolved settings. Precedence, highest first: flag → environment → config file → default.
AccessToken, when set, is a ready-to-use bearer token that bypasses the PKCE flow entirely — used by scripts that mint their own token, and by the tests. ClientID and RedirectURI drive the interactive login.