-
Notifications
You must be signed in to change notification settings - Fork 139
[Client] Add OAuth 2.0 credential storage interface (TokenStorageInterface) #315
Copy link
Copy link
Open
Labels
ClientIssues & PRs related to the Client componentIssues & PRs related to the Client componentP1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuthenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScriptImproves consistency with other SDKs such as TyepScript
Metadata
Metadata
Assignees
Labels
ClientIssues & PRs related to the Client componentIssues & PRs related to the Client componentP1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featureauthIssues and PRs related to Authentication / OAuthIssues and PRs related to Authentication / OAuthenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScriptImproves consistency with other SDKs such as TyepScript
Type
Fields
Give feedbackNo fields configured for issues without a type.
Context
Foundation for every OAuth flow on the client side. Without a storage abstraction we cannot persist access tokens, refresh tokens, registered client credentials, or PKCE verifiers across requests/sessions.
Scope
Mcp\Client\Auth\TokenStorageInterfacewith operations:getToken(string $resourceUrl): ?TokenSet,storeToken(string $resourceUrl, TokenSet $token): void,clearToken(string $resourceUrl): void, plus equivalents for registered client metadata.TokenSet(access_token, refresh_token, expires_at, scope, token_type).InMemoryTokenStorage(ephemeral, per-process).Psr16TokenStorageadapter for PSR-16CacheInterface.Client\Builder::setTokenStorage(...)(optional; defaults to in-memory).Conformance scenarios unblocked
Prerequisite for all
auth/*baseline scenarios.Dependencies
None — must land first.
Acceptance
src/Client/Auth/.cc @soyuka