Skip to content

Commit 8ee9507

Browse files
authored
[BUG][Python] init access token for python client configuration (#7469)
* fix: init access token for python client configuration * fix: remove duplicate initializations for access_token
1 parent 66e5116 commit 8ee9507

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

.generator/templates/configuration.mustache

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ conf = {{{packageName}}}.Configuration(
163163

164164
def __init__(self, host=None,
165165
api_key=None, api_key_prefix=None,
166+
access_token=None,
166167
username=None, password=None,
167168
discard_unknown_keys=False,
168169
disabled_client_side_validations="",
@@ -190,6 +191,7 @@ conf = {{{packageName}}}.Configuration(
190191
"""Temp file folder for downloading files
191192
"""
192193
# Authentication Settings
194+
self.access_token = access_token
193195
self.api_key = {}
194196
if api_key:
195197
self.api_key = api_key
@@ -218,18 +220,6 @@ conf = {{{packageName}}}.Configuration(
218220
"""The HTTP signing configuration
219221
"""
220222
{{/hasHttpSignatureMethods}}
221-
{{#hasOAuthMethods}}
222-
self.access_token = None
223-
"""access token for OAuth/Bearer
224-
"""
225-
{{/hasOAuthMethods}}
226-
{{^hasOAuthMethods}}
227-
{{#hasBearerMethods}}
228-
self.access_token = None
229-
"""access token for OAuth/Bearer
230-
"""
231-
{{/hasBearerMethods}}
232-
{{/hasOAuthMethods}}
233223
self.logger = {}
234224
"""Logging Settings
235225
"""

0 commit comments

Comments
 (0)