[PR #277] [MERGED] Optionally load expired tokens from the cache #366

Closed
opened 2026-02-27 20:24:26 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ramsayleung/rspotify/pull/277
Author: @DusterTheFirst
Created: 10/22/2021
Status: Merged
Merged: 10/26/2021
Merged by: @marioortizmanero

Base: masterHead: patch-1


📝 Commits (8)

  • de11b4e Optionally load expired tokens from the cache
  • 3f48775 Apply change to ClientCredsSpotify implmentation
  • 7350582 Fix wrong logic
  • e84fd84 Swap conditions around to match both files
  • 9bffecc Revert change to client_creds and more doc
  • f81552d Update implementation of prompt_for_token
  • ebdb897 Ensure token was refreshed
  • 71fda2a Address suggestions

📊 Changes

2 files changed (+50 additions, -8 deletions)

View changed files

📝 src/client_creds.rs (+1 -2)
📝 src/clients/oauth.rs (+49 -6)

📄 Description

Description

Adds a parameter to the read_token_cache function to allow loading expired tokens from the cache. This can be useful in cases where the user wants to access the refresh token stored in the token cache.

Closes #276

Motivation and Context

See #276

Type of change

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This change has a very predicable effect on the code and has not been tested. If it is required I can add test cases for this function or otherwise test it further


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ramsayleung/rspotify/pull/277 **Author:** [@DusterTheFirst](https://github.com/DusterTheFirst) **Created:** 10/22/2021 **Status:** ✅ Merged **Merged:** 10/26/2021 **Merged by:** [@marioortizmanero](https://github.com/marioortizmanero) **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (8) - [`de11b4e`](https://github.com/ramsayleung/rspotify/commit/de11b4ee6a32b39e2acac5a88141041da8cb201b) Optionally load expired tokens from the cache - [`3f48775`](https://github.com/ramsayleung/rspotify/commit/3f48775ee8eff1c23c7b8bcbbb8ab4d3ba602e3d) Apply change to ClientCredsSpotify implmentation - [`7350582`](https://github.com/ramsayleung/rspotify/commit/735058254d671094da22fad02d81ad4c2d0d0746) Fix wrong logic - [`e84fd84`](https://github.com/ramsayleung/rspotify/commit/e84fd841bf3b1dab96a16b0b679ce97a1a19748c) Swap conditions around to match both files - [`9bffecc`](https://github.com/ramsayleung/rspotify/commit/9bffeccbf925adc12afbce8702e2a0a9ec4e9412) Revert change to client_creds and more doc - [`f81552d`](https://github.com/ramsayleung/rspotify/commit/f81552dc6007173757ac4f90c58483859bea68d2) Update implementation of `prompt_for_token` - [`ebdb897`](https://github.com/ramsayleung/rspotify/commit/ebdb89779f58c95fbfae1f4f56c16601f946d731) Ensure token was refreshed - [`71fda2a`](https://github.com/ramsayleung/rspotify/commit/71fda2a0e0d6cc72705ddfebb03ea27f9b7520b3) Address suggestions ### 📊 Changes **2 files changed** (+50 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/client_creds.rs` (+1 -2) 📝 `src/clients/oauth.rs` (+49 -6) </details> ### 📄 Description ## Description Adds a parameter to the `read_token_cache` function to allow loading expired tokens from the cache. This can be useful in cases where the user wants to access the refresh token stored in the token cache. Closes #276 ## Motivation and Context See #276 ## Type of change - [x] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] This change requires a documentation update ## How Has This Been Tested? This change has a very predicable effect on the code and has not been tested. If it is required I can add test cases for this function or otherwise test it further --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:24:26 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rspotify#366
No description provided.