Documentation
¶
Index ¶
- func NewKeyringTokenStore() mcp.OAuthTokenStore
- func Register()
- type KeyringTokenStore
- func (s *KeyringTokenStore) GetToken(resourceURL string) (*mcp.OAuthToken, error)
- func (s *KeyringTokenStore) ListOAuthTokens() []mcp.OAuthTokenEntry
- func (s *KeyringTokenStore) RemoveToken(resourceURL string) error
- func (s *KeyringTokenStore) StoreToken(resourceURL string, token *mcp.OAuthToken) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewKeyringTokenStore ¶
func NewKeyringTokenStore() mcp.OAuthTokenStore
NewKeyringTokenStore returns the process-wide token store backed by the OS keyring, falling back to InMemoryTokenStore when no backend is available. It always returns the same instance.
Types ¶
type KeyringTokenStore ¶
type KeyringTokenStore struct {
// contains filtered or unexported fields
}
KeyringTokenStore keeps OAuth tokens in memory, sealing them to disk with a key held in the OS keyring. The keyring is touched at most once per process (to fetch or create the key), so the user's "Always Allow" decision keeps applying to refreshes and to newly authorized servers.
func (*KeyringTokenStore) GetToken ¶
func (s *KeyringTokenStore) GetToken(resourceURL string) (*mcp.OAuthToken, error)
func (*KeyringTokenStore) ListOAuthTokens ¶
func (s *KeyringTokenStore) ListOAuthTokens() []mcp.OAuthTokenEntry
ListOAuthTokens returns a snapshot of all stored tokens.
func (*KeyringTokenStore) RemoveToken ¶
func (s *KeyringTokenStore) RemoveToken(resourceURL string) error
func (*KeyringTokenStore) StoreToken ¶
func (s *KeyringTokenStore) StoreToken(resourceURL string, token *mcp.OAuthToken) error
Click to show internal directories.
Click to hide internal directories.