Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,12 @@ class Configuration(object):

:return: The token for basic HTTP authentication.
"""
return urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
token = ""
if self.username or self.password:
token = urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
return token

def auth_settings(self):
"""Gets Auth Settings dict for api client.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.9-SNAPSHOT
2.4.33-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ def get_basic_auth_token(self):

:return: The token for basic HTTP authentication.
"""
return urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
token = ""
if self.username or self.password:
token = urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
return token

def auth_settings(self):
"""Gets Auth Settings dict for api client.
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/python/.swagger-codegen/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.4.20-SNAPSHOT
2.4.33-SNAPSHOT
9 changes: 6 additions & 3 deletions samples/client/petstore/python/petstore_api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,12 @@ def get_basic_auth_token(self):

:return: The token for basic HTTP authentication.
"""
return urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
token = ""
if self.username or self.password:
token = urllib3.util.make_headers(
basic_auth=self.username + ':' + self.password
).get('authorization')
return token

def auth_settings(self):
"""Gets Auth Settings dict for api client.
Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/python/test/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# coding: utf-8