Commit graph

8 commits

Author SHA1 Message Date
Nick Steel
4f9151c642
Credentials with access token (oauth) (#1309)
* core: Create credentials from access token via OAuth2

* core: Credentials.username is optional: not required for token auth.

* core: store auth data within session. We might need this later if need to re-auth and original creds are no longer valid/available.

* bin: New --token arg for using Spotify access token. Specify 0 to manually enter the auth code (headless).

* bin: Added --enable-oauth / -j option. Using --password / -p option will error and exit.

* core: reconnect session if using token authentication

Token authenticated sessions cannot use keymaster. So reconnect using the reusable credentials we just obtained. Can perhaps remove this
workaround once keymaster is replaced with login5.

* examples: replace password login with token login
2024-09-13 07:35:55 +02:00
Roderick van Domburg
05b9b13cf8
Merge branch 'dev' into new-api and update crates 2022-07-27 23:31:11 +02:00
Louis Seubert
6c2491b9a3
adding callback for reusable credentials (#983)
This allows more control over how the credentials are saved to the cache
2022-05-20 12:53:44 +02:00
Roderick van Domburg
2065ded7b6
Fix examples 2022-01-16 01:29:50 +01:00
Roderick van Domburg
d3074f597a
Remove keymaster and update example 2021-06-22 21:49:36 +02:00
johannesd3
11ce29077e Fix formatting 2021-04-09 10:45:48 +02:00
ThouCheese
ec1ec59b8a update examples
Re-add default impl to SessionConfig and make Credentials::with_password generic over Into<String>

add docs for Credential

reintroduce old Default impl for SessionConfig

use the third argument for the track-to-play rather than a testing id
2021-03-24 01:14:44 +01:00
Ash
064359c26e
Add an example to fetch a Spotify API token (#512) 2020-08-25 23:13:46 +02:00