MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / SetOAuthStorage

Method SetOAuthStorage

internal/agent/api.go:450–450  ·  view source on GitHub ↗

SetOAuthStorage wires in the OAuth storage handle separately from the provider. The consent handler needs Pool() to begin a pgx tx that spans the agent-create (identity pkg) and the auth-code insert (fosite → oauth pkg). Provider-only callers (e.g. /token) don't need it, but it's required for /conse

(s *oauth.Storage)

Source from the content-addressed store, hash-verified

448// it, but it's required for /consent to work; setting one without the
449// other is a misconfiguration the consent handler surfaces as a 503.
450func (a *API) SetOAuthStorage(s *oauth.Storage) { a.oauthStorage = s }
451
452// SetIdempotencyStore enables Idempotency-Key processing on the
453// outbound /send and /reply endpoints. When nil (the default) the

Callers 5

bareDiscoveryServerFunction · 0.95
newConsentFixtureFunction · 0.95
newDCRServerFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 4

bareDiscoveryServerFunction · 0.76
newConsentFixtureFunction · 0.76
newDCRServerFunction · 0.76