Skip to content

Commit 88cfc78

Browse files
committed
docs(auth): clarify refresh failure handling
1 parent 0507fdc commit 88cfc78

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

crates/rmcp/src/transport/auth.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,9 +1722,11 @@ impl AuthorizationManager {
17221722

17231723
/// Get access token from local credential store.
17241724
/// If expired, refresh it automatically when a refresh token is available.
1725-
/// When the access token has expired and no refresh token is available (or
1726-
/// the refresh itself fails), returns [`AuthError::AuthorizationRequired`]
1727-
/// so the caller can re-authenticate.
1725+
/// When the access token has expired and no refresh token is available, or the
1726+
/// authorization server rejects the refresh token, returns
1727+
/// [`AuthError::AuthorizationRequired`] so the caller can re-authenticate.
1728+
/// Transient refresh failures return [`AuthError::TokenRefreshFailed`] so the
1729+
/// caller can retry; other errors are propagated as-is.
17281730
pub async fn get_access_token(&self) -> Result<String, AuthError> {
17291731
let stored = self.credential_store.load().await?;
17301732
let Some(stored_creds) = stored else {

0 commit comments

Comments
 (0)