refactor: use rmcp StateStore and AuthorizationManager APIs for MCP OAuth re-exports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
centdix
2026-02-16 14:25:44 +00:00
committed by claude-agent
parent ba80570357
commit d322ccc846
+8 -7
View File
@@ -36,13 +36,14 @@ pub mod client_registration;
// Re-export rmcp auth types when auth feature is enabled
#[cfg(feature = "auth")]
pub mod oauth {
//! Re-exports of rmcp auth and oauth2 types for MCP OAuth implementations
//! Re-exports of rmcp auth types for MCP OAuth implementations
pub use rmcp::transport::auth::AuthorizationManager;
// Re-export oauth2 types needed for MCP OAuth flow
pub use oauth2::{
basic::BasicClient, AuthUrl, ClientId, ClientSecret, CsrfToken, PkceCodeChallenge,
RedirectUrl, Scope, TokenUrl,
pub use rmcp::transport::auth::{
AuthError as RmcpAuthError, AuthorizationManager,
AuthorizationMetadata as RmcpAuthorizationMetadata, OAuthClientConfig, OAuthTokenResponse,
StateStore, StoredAuthorizationState,
};
// Re-export the TokenResponse trait so consumers can access token fields
pub use oauth2::TokenResponse;
}