Documentation
¶
Overview ¶
Package modelauth owns encrypted run credentials, never user login state.
Index ¶
- func RedactKnownSecret(value, secret string) string
- func Validate(provider string, c sdk.ModelCredential) error
- func ValidateModel(model *sdk.RunModel) error
- type AuthenticationError
- type Callback
- type Manager
- func (m *Manager) Prepare(appID, runID, provider string, c sdk.ModelCredential) (*agentcore.RunModelCredential, error)
- func (m *Manager) RedactReviewContext(ctx context.Context, appID, runID, value string) (string, error)
- func (m *Manager) Replace(ctx context.Context, appID, runID string, c sdk.ModelCredential) error
- func (m *Manager) Transport(base http.RoundTripper, run *agentcore.AgentRun, provider string) http.RoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RedactKnownSecret ¶ added in v0.11.2
RedactKnownSecret masks a known credential in both its literal and JSON-escaped forms.
func ValidateModel ¶
Types ¶
type AuthenticationError ¶
type AuthenticationError struct{ Provider, ConnectionID, Reason string }
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
type Manager ¶
type Manager struct {
Store agentcore.ModelCredentialStore
Key []byte
ChatGPTEnabled bool
Callbacks map[string]Callback
HTTPClient *http.Client
}
func (*Manager) Prepare ¶
func (m *Manager) Prepare(appID, runID, provider string, c sdk.ModelCredential) (*agentcore.RunModelCredential, error)
func (*Manager) RedactReviewContext ¶ added in v0.11.2
func (m *Manager) RedactReviewContext(ctx context.Context, appID, runID, value string) (string, error)
RedactReviewContext masks locally known run credentials without refreshing tokens or exposing them to the caller. Failure makes external review unsafe.
func (*Manager) Transport ¶
func (m *Manager) Transport(base http.RoundTripper, run *agentcore.AgentRun, provider string) http.RoundTripper
Transport resolves the current credential for every request, including summaries. It retries only an HTTP authentication rejection before a response stream starts.
Click to show internal directories.
Click to hide internal directories.