Crate librespot_oauth

Crate librespot_oauth 

Source
Expand description

Provides a Spotify access token using the OAuth authorization code flow with PKCE.

Assuming sufficient scopes, the returned access token may be used with Spotify’s Web API, and/or to establish a new Session with [librespot_core].

The authorization code flow is an interactive process which requires a web browser to complete. The resulting code must then be provided back from the browser to this library for exchange into an access token. Providing the code can be automatic via a spawned http server (mimicking Spotify’s client), or manually via stdin. The latter is appropriate for headless systems.

Structs§

OAuthClient
Struct that handle obtaining and refreshing access tokens.
OAuthClientBuilder
Builder struct through which structures of type OAuthClient are instantiated.
OAuthToken
Represents an OAuth token used for accessing Spotify’s Web API and sessions.

Enums§

OAuthError
Possible errors encountered during the OAuth authentication flow.

Functions§

get_access_tokenDeprecated
Obtain a Spotify access token using the authorization code with PKCE OAuth flow. The redirect_uri must match what is registered to the client ID. Obtain a Spotify access token using the authorization code with PKCE OAuth flow. The redirect_uri must match what is registered to the client ID.