Documentation
¶
Index ¶
Constants ¶
const ( Name = "anthropic" DefaultAnthropicURL = "https://api.anthropic.com" ClaudeAIBaseURL = "https://claude.ai" AnthropicVersion = "2023-06-01" )
Variables ¶
var ( ErrSnapshotRefreshRequired = oauthrefresh.ErrSnapshotRefreshRequired ErrCredentialPersistenceDegraded = oauthrefresh.ErrCredentialPersistenceDegraded )
Functions ¶
func RegisterWithAuth ¶
func RegisterWithAuth(reg *adapter.Registry, client *http.Client, sink CredentialSink, refresh SnapshotRefreshTrigger) error
RegisterWithAuth re-registers the anthropic adapter with OAuth token refresh enabled (used by the gateway once the control plane is reachable).
Types ¶
type Adapter ¶
func NewWithAuth ¶
func NewWithAuth(client *http.Client, sink CredentialSink, refresh SnapshotRefreshTrigger) *Adapter
NewWithAuth enables OAuth token refresh (claude.ai browser login). The sink persists refreshed credentials to the control plane; refresh triggers a snapshot re-adoption on revision conflicts. A nil sink still allows in-memory refresh.
type ControlPlaneSink ¶
type ControlPlaneSink = oauthrefresh.ControlPlaneSink
type CredentialPersistResult ¶
type CredentialPersistResult = oauthrefresh.CredentialPersistResult
type CredentialSink ¶
type CredentialSink = oauthrefresh.CredentialSink
type SnapshotRefreshTrigger ¶
type SnapshotRefreshTrigger = oauthrefresh.SnapshotRefreshTrigger