You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auth: first-class apikey type and digest authentication #41
API keys are the most common credential on the internet, and today the only way to make one a project default is the exec header=X-Api-Key prefix= workaround or writing the header in every request. Digest auth is in every comparison table (httpyac, Bruno, Hurl, curl) and apic has none.
Default header X-Api-Key, no prefix. query= puts it in the URL (masked in output under --redact, and the header name is added to the always-masked list).
Usable as auth.default in apic.yaml. describe shows auth: apikey (header X-Api-Key).
apic curl maps to -H or a query parameter.
digest
# @auth digest {{user}} {{password}}
RFC 7616: MD5, MD5-sess, SHA-256, SHA-256-sess, qop=auth (and auth-int for requests with a body), opaque, nonce counting within a run. Implemented in-tree from the RFC in the style of internal/auth/sigv4.go; no dependency.
Handles the 401 challenge round trip transparently (one extra request), reported in -v and as "auth": "digest" in --json. Credentials never appear in output.
apic curl maps to --digest --user.
Where
internal/auth/spec.go (types at 23-30), apply.go (40-62), new digest.go, internal/runner/runner.go (challenge retry), internal/runner/redact.go (header list), internal/curlexport/curl.go.
internal/auth/auth_test.go: RFC 7616 example vectors for digest; apikey header/query/prefix forms; runner test with an httptest server issuing the challenge; redaction of the query form; curl export.
Shipped in #106 (merged as 8351e8b): # @auth apikey <key> [header=|query=|prefix=] as a type usable as auth.default, and # @auth digest <user> <password> per RFC 7616 in-tree (MD5, MD5-sess, SHA-256, SHA-256-sess, auth and auth-int, opaque, userhash, stale nonces), answering the challenge inside the request, pinned to the host the file addressed, with the challenge remembered per server for the invocation. run -v reports it, --json says "auth": "digest", apic curl maps both, and the Postman importer carries digest auth across.
Activity
auth: first-class apikey type and digest authentication (#41)
dataGriff commentedon Sep 21, 2026
Shipped in #106 (merged as
8351e8b):# @auth apikey <key> [header=|query=|prefix=]as a type usable asauth.default, and# @auth digest <user> <password>per RFC 7616 in-tree (MD5, MD5-sess, SHA-256, SHA-256-sess, auth and auth-int, opaque, userhash, stale nonces), answering the challenge inside the request, pinned to the host the file addressed, with the challenge remembered per server for the invocation.run -vreports it,--jsonsays"auth": "digest",apic curlmaps both, and the Postman importer carries digest auth across.Generated by Claude Code