Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Generic] tls verify not being honored at the httprequest level when internal_ssl is enabled #326

Merged
merged 2 commits into from
Feb 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions oauthenticator/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class GenericOAuthenticator(OAuthenticator):
async def authenticate(self, handler, data=None):
code = handler.get_argument("code")
# TODO: Configure the curl_httpclient for tornado
http_client = AsyncHTTPClient()
http_client = AsyncHTTPClient(force_instance=True, defaults=dict(validate_cert=self.tls_verify))
minrk marked this conversation as resolved.
Show resolved Hide resolved

params = dict(
redirect_uri=self.get_callback_url(handler),
Expand All @@ -97,7 +97,6 @@ async def authenticate(self, handler, data=None):
url,
method="POST",
headers=headers,
validate_cert=self.tls_verify,
body=urllib.parse.urlencode(params),
)

Expand Down Expand Up @@ -130,7 +129,6 @@ async def authenticate(self, handler, data=None):
url,
method=self.userdata_method,
headers=headers,
validate_cert=self.tls_verify,
)
resp = await http_client.fetch(req)
resp_json = json.loads(resp.body.decode('utf8', 'replace'))
Expand Down