Authentication
401 challenges with configurable WWW-Authenticate schemes.
Returns 401 with WWW-Authenticate challenges that contradict each other, omit required attributes, violate quoting rules, or use undefined schemes. Tests how auth clients cope when the challenge itself is broken.
Returns 401 with a WWW-Authenticate challenge when no Authorization header is present. If any Authorization header is sent — regardless of its value — returns 200. This lets clients exercise the full challenge-response cycle without needing real credentials.
Returns 200 with a JWT the server claims to have accepted, demonstrating broken token-validation logic. The chaos is server acceptance of tokens that should be rejected. Default accepts alg:none tokens with no signature.
Tests how clients handle 401 challenges and whether they retry with credentials. The endpoint accepts any value in the Authorization header on retry — the goal is to verify the round-trip, not to validate credentials.
The scheme=none mode is worth highlighting: it returns 401 but omits the
WWW-Authenticate header entirely, which is invalid per RFC 7235 but happens
in the wild. Well-behaved clients should still report the 401 clearly rather
than treating it as a generic failure.