Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterProviderForLazySetup ¶
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 ¶
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 ¶
type EventType string
EventType represents the type of OAuth event from Docker Desktop
type NotificationMonitor ¶
type NotificationMonitor struct { OnOAuthEvent func(event Event) // contains filtered or unexported fields }
NotificationMonitor subscribes to Docker Desktop's OAuth notification stream
func NewNotificationMonitor ¶
func NewNotificationMonitor() *NotificationMonitor
NewNotificationMonitor creates a new notification monitor
func (*NotificationMonitor) Start ¶
func (m *NotificationMonitor) Start(ctx context.Context)
Start begins monitoring OAuth notifications from Docker Desktop
type Provider ¶
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 ¶
NewProvider creates a new OAuth provider
func (*Provider) Run ¶
Run starts the provider's background loop Loop dynamically adjusts timing based on token expiry