Example of authorization is needed (CLI) and no debug option to see what goes wrong (401 response)
Dear devs,
I'm trying to make docker image (CLI mode) working for our service (secured with basic auth)
However is not very clear what to put inside -a parameter.
I tried all possible combinations: only base64 token, token with Basic in front, full string Authorization: Basic ... nothing worked - all the time 401 back. May be good example will be useful.
Meanwhile I would really love to see instead of Java stack some meaningfull trace results like for example curl-like request printed out with headers. It will significantly help to analyze what goes wrong.
Do you have any ideas is it possible within current version?
Thank you!
Potentially related: https://stackoverflow.com/a/42137322
I too have found this very challenging given there isn't an example provided.
Also cross posting to https://github.com/OpenAPITools/openapi-generator/issues/6745
Hello; this plagued me for a full day using openapi-generator. I did get it to work with the following steps. TL:DR for basic auth for anyone showing up here:
- base64 encode your
username:password(e.g. admin:admin) - append that string to
Basic(note the space!) and url encode that - append that to
Authorization:to arrive at...
$ > openapi-generator generate -a Authorization:Basic%20YWRtaW46YWRtaW4%3D ...
+1.
An actionable documentation must be more than vague descriptions, e.g., the current -a/--auth doc only has "adds authorization headers when fetching the swagger definitions remotely. Pass in a URL-encoded string of name:header with a comma separating multiple values", a viable documentation should include worked examples.