Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProviderForLazySetup ¶ added in v0.22.0
RegisterProviderForLazySetup registers a DCR provider with Docker Desktop This allows 'docker mcp oauth authorize' to work before full DCR is complete Idempotent - safe to call multiple times for the same server
Types ¶
type CredentialHelper ¶
type CredentialHelper struct {
// contains filtered or unexported fields
}
CredentialHelper provides secure access to OAuth tokens via docker-credential-desktop
func NewOAuthCredentialHelper ¶
func NewOAuthCredentialHelper() *CredentialHelper
NewOAuthCredentialHelper creates a new OAuth credential helper
func (*CredentialHelper) GetOAuthToken ¶
GetOAuthToken retrieves an OAuth token for the specified server It follows this flow: 1. Get DCR client info to retrieve provider name and authorization endpoint 2. Construct credential key using: [AuthorizationEndpoint]/[ProviderName] 3. Retrieve token from docker-credential-desktop
func (*CredentialHelper) GetTokenStatus ¶ added in v0.22.0
func (h *CredentialHelper) GetTokenStatus(ctx context.Context, serverName string) (TokenStatus, error)
GetTokenStatus checks if an OAuth token is valid and whether it needs refresh
type EventType ¶ added in v0.22.0
type EventType string
EventType represents the type of OAuth event from Docker Desktop
type NotificationMonitor ¶ added in v0.22.0
type NotificationMonitor struct {
OnOAuthEvent func(event Event)
// contains filtered or unexported fields
}
NotificationMonitor subscribes to Docker Desktop's OAuth notification stream
func NewNotificationMonitor ¶ added in v0.22.0
func NewNotificationMonitor() *NotificationMonitor
NewNotificationMonitor creates a new notification monitor
func (*NotificationMonitor) Start ¶ added in v0.22.0
func (m *NotificationMonitor) Start(ctx context.Context)
Start begins monitoring OAuth notifications from Docker Desktop
type Provider ¶ added in v0.22.0
type Provider struct {
// contains filtered or unexported fields
}
Provider manages OAuth token lifecycle for a single MCP server Each provider runs in its own goroutine with dynamic timing based on token expiry
func NewProvider ¶ added in v0.22.0
NewProvider creates a new OAuth provider
func (*Provider) Run ¶ added in v0.22.0
Run starts the provider's background loop Loop dynamically adjusts timing based on token expiry