MCPcopy
hub / github.com/dosco/graphjin / apiKeyAuth

Struct apiKeyAuth

core/openapi/auth.go:114–116  ·  view source on GitHub ↗

apiKeyAuth attaches a key as either a header or a query parameter. OpenAPI distinguishes these via the securityScheme's `in` field, but users supply it directly in the GraphJin config so we don't need to thread that through.

Source from the content-addressed store, hash-verified

112// users supply it directly in the GraphJin config so we don't need to
113// thread that through.
114type apiKeyAuth struct {
115 cfg AuthConfig
116}
117
118func (a *apiKeyAuth) Apply(_ context.Context, req *http.Request, hdrIn http.Header) error {
119 val := a.cfg.KeyValue

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected