Skip to content

Fix: Generate observed auth as OpenAPI security schemes#8

Open
alexchexes wants to merge 1 commit into
AndrewWalsh:mainfrom
alexchexes:fix/auth-as-schemes
Open

Fix: Generate observed auth as OpenAPI security schemes#8
alexchexes wants to merge 1 commit into
AndrewWalsh:mainfrom
alexchexes:fix/auth-as-schemes

Conversation

@alexchexes

@alexchexes alexchexes commented May 2, 2026

Copy link
Copy Markdown

This changes auth-looking request headers and cookies to be represented as OpenAPI security schemes, instead of regular operation parameters.

Authorization is handled again too: when it is observed, the generated spec includes both Bearer auth and a generic API-key header option. If a request has several credentials, they are listed as separate alternatives, since the HAR only tells us what was sent, not which one the server actually requires.

This also avoids a couple of bad cases:

  • protocol headers like Sec-WebSocket-Key are ignored instead of becoming auth schemes;
  • similar names like X-Api+Key and X-Api_Key no longer overwrite each other after sanitising.

Since this project is apparently discontinued, I have prepared a release (chrome extension only):
https://github.com/alexchexes/demystify/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant