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

Function newClient

internal/oauth/storage_test.go:72–83  ·  view source on GitHub ↗

newClient returns a minimal fosite.Client matching the row seedClient inserts. We only need the methods fosite reads during the storage path; the storage adapter re-hydrates the canonical row on lookup.

(id string)

Source from the content-addressed store, hash-verified

70// inserts. We only need the methods fosite reads during the storage
71// path; the storage adapter re-hydrates the canonical row on lookup.
72func newClient(id string) (*oauth.Client, error) {
73 return &oauth.Client{
74 ID: id,
75 Name: "test client",
76 RedirectURIs: []string{"http://localhost/cb"},
77 GrantTypeStrings: []string{"authorization_code", "refresh_token"},
78 ResponseTypeStrings: []string{"code"},
79 ScopeStrings: []string{"mcp"},
80 Public: true,
81 TokenEndpointAuthMethodS: "none",
82 }, nil
83}
84
85func setup(t *testing.T) (*oauth.Storage, *identity.Store, *pgxpool.Pool, string, string) {
86 t.Helper()

Callers 1

newRequesterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected