Skip to content

Feature: authentication support (-u basic auth, --cookie, bearer tokens) #44

Description

@korya

Problem

There are no authentication conveniences. Anything non-public requires hand-rolling headers:

http-assert -H "Authorization: Basic $(printf 'user:pass' | base64)" …
http-assert -H "Cookie: session=abc123"

Proposed

-u, --user user:password   Use basic authentication
    --bearer token         Set an Authorization: Bearer header
-b, --cookie name=value    Send a cookie (repeatable)

Why it matters

Health checks on authenticated endpoints are common, and base64-in-a-subshell is both awkward and a good way to leak credentials into shell history and CI logs. A -u flag can also read from an environment variable to avoid that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions