Created by: tomghyselinck
PR checklist
-
Read the contribution guidelines. -
Ran the shell script under ./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
,./bin/security/{LANG}-petstore.sh
and./bin/openapi3/security/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. -
Filed the PR against the correct branch: master
,. Default:3.4.x
,4.0.x
master
. -
Copied the technical committee to review the pull request if your PR is targeting a particular programming language. -- @taxpon @frol @mbohlool @cbornet @kenjones-cisco @tomplus @Jyhess
Description of the PR
This PR fixes the missing APIKey
authentication based on HTTP Cookies in Python clients.
Fixes #2075 (closed)
I am using this change for quite some time in our local build and it works as expected.
When we receive the Set-Cookie
header from the OpenAPI server, we update the configuration in the ApiClient
.
Authentication works seamless from then on. There no need to set/add the Cookie
header ourselves anymore.
TODO
There are some things related to the Cookie authentication which we might include here or add as separate BUG report or PR:
-
Add unit tests for cookie authentication (as suggested in https://github.com/OpenAPITools/openapi-generator/issues/2075#issuecomment-462347814) -
Create Issue report and/or PR for incorrect Python-flask unit tests regarding APIKey authentication based on HTTP Cookies.
Please advise what to do with these pending changes.