We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de33c6f commit e287f8bCopy full SHA for e287f8b
modules/swagger-codegen/src/main/resources/python/configuration.mustache
@@ -216,9 +216,12 @@ class Configuration(object):
216
217
:return: The token for basic HTTP authentication.
218
"""
219
- return urllib3.util.make_headers(
220
- basic_auth=self.username + ':' + self.password
221
- ).get('authorization')
+ token = ""
+ if self.username or self.password:
+ token = urllib3.util.make_headers(
222
+ basic_auth=self.username + ':' + self.password
223
+ ).get('authorization')
224
+ return token
225
226
def auth_settings(self):
227
"""Gets Auth Settings dict for api client.
0 commit comments