@@ -33,12 +33,12 @@ def __init__(self, api_client=None):
33
33
api_client = ApiClient ()
34
34
self .api_client = api_client
35
35
36
- def auth_generatetoken_post (self , grant_type , username , password , ** kwargs ): # noqa: E501
36
+ def generate_token (self , grant_type , username , password , ** kwargs ): # noqa: E501
37
37
"""Create an authentication token # noqa: E501
38
38
39
39
This method makes a synchronous HTTP request by default. To make an
40
40
asynchronous HTTP request, please pass async=True
41
- >>> thread = api.auth_generatetoken_post (grant_type, username, password, async=True)
41
+ >>> thread = api.generate_token (grant_type, username, password, async=True)
42
42
>>> result = thread.get()
43
43
44
44
:param async bool
@@ -51,17 +51,17 @@ def auth_generatetoken_post(self, grant_type, username, password, **kwargs): #
51
51
"""
52
52
kwargs ['_return_http_data_only' ] = True
53
53
if kwargs .get ('async' ):
54
- return self .auth_generatetoken_post_with_http_info (grant_type , username , password , ** kwargs ) # noqa: E501
54
+ return self .generate_token_with_http_info (grant_type , username , password , ** kwargs ) # noqa: E501
55
55
else :
56
- (data ) = self .auth_generatetoken_post_with_http_info (grant_type , username , password , ** kwargs ) # noqa: E501
56
+ (data ) = self .generate_token_with_http_info (grant_type , username , password , ** kwargs ) # noqa: E501
57
57
return data
58
58
59
- def auth_generatetoken_post_with_http_info (self , grant_type , username , password , ** kwargs ): # noqa: E501
59
+ def generate_token_with_http_info (self , grant_type , username , password , ** kwargs ): # noqa: E501
60
60
"""Create an authentication token # noqa: E501
61
61
62
62
This method makes a synchronous HTTP request by default. To make an
63
63
asynchronous HTTP request, please pass async=True
64
- >>> thread = api.auth_generatetoken_post_with_http_info (grant_type, username, password, async=True)
64
+ >>> thread = api.generate_token_with_http_info (grant_type, username, password, async=True)
65
65
>>> result = thread.get()
66
66
67
67
:param async bool
@@ -73,33 +73,34 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
73
73
returns the request thread.
74
74
"""
75
75
76
+ local_var_params = locals ()
77
+
76
78
all_params = ['grant_type' , 'username' , 'password' ] # noqa: E501
77
79
all_params .append ('async' )
78
80
all_params .append ('_return_http_data_only' )
79
81
all_params .append ('_preload_content' )
80
82
all_params .append ('_request_timeout' )
81
83
82
- params = locals ()
83
- for key , val in six .iteritems (params ['kwargs' ]):
84
+ for key , val in six .iteritems (local_var_params ['kwargs' ]):
84
85
if key not in all_params :
85
86
raise TypeError (
86
87
"Got an unexpected keyword argument '%s'"
87
- " to method auth_generatetoken_post " % key
88
+ " to method generate_token " % key
88
89
)
89
- params [key ] = val
90
- del params ['kwargs' ]
90
+ local_var_params [key ] = val
91
+ del local_var_params ['kwargs' ]
91
92
# verify the required parameter 'grant_type' is set
92
- if ('grant_type' not in params or
93
- params ['grant_type' ] is None ):
94
- raise ValueError ("Missing the required parameter `grant_type` when calling `auth_generatetoken_post `" ) # noqa: E501
93
+ if ('grant_type' not in local_var_params or
94
+ local_var_params ['grant_type' ] is None ):
95
+ raise ValueError ("Missing the required parameter `grant_type` when calling `generate_token `" ) # noqa: E501
95
96
# verify the required parameter 'username' is set
96
- if ('username' not in params or
97
- params ['username' ] is None ):
98
- raise ValueError ("Missing the required parameter `username` when calling `auth_generatetoken_post `" ) # noqa: E501
97
+ if ('username' not in local_var_params or
98
+ local_var_params ['username' ] is None ):
99
+ raise ValueError ("Missing the required parameter `username` when calling `generate_token `" ) # noqa: E501
99
100
# verify the required parameter 'password' is set
100
- if ('password' not in params or
101
- params ['password' ] is None ):
102
- raise ValueError ("Missing the required parameter `password` when calling `auth_generatetoken_post `" ) # noqa: E501
101
+ if ('password' not in local_var_params or
102
+ local_var_params ['password' ] is None ):
103
+ raise ValueError ("Missing the required parameter `password` when calling `generate_token `" ) # noqa: E501
103
104
104
105
collection_formats = {}
105
106
@@ -111,12 +112,12 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
111
112
112
113
form_params = []
113
114
local_var_files = {}
114
- if 'grant_type' in params :
115
- form_params .append (('grant_type' , params ['grant_type' ])) # noqa: E501
116
- if 'username' in params :
117
- form_params .append (('username' , params ['username' ])) # noqa: E501
118
- if 'password' in params :
119
- form_params .append (('password' , params ['password' ])) # noqa: E501
115
+ if 'grant_type' in local_var_params :
116
+ form_params .append (('grant_type' , local_var_params ['grant_type' ])) # noqa: E501
117
+ if 'username' in local_var_params :
118
+ form_params .append (('username' , local_var_params ['username' ])) # noqa: E501
119
+ if 'password' in local_var_params :
120
+ form_params .append (('password' , local_var_params ['password' ])) # noqa: E501
120
121
121
122
body_params = None
122
123
# HTTP header `Accept`
@@ -131,7 +132,7 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
131
132
auth_settings = [] # noqa: E501
132
133
133
134
return self .api_client .call_api (
134
- '/auth/generatetoken/ ' , 'POST' ,
135
+ '/1.0.0/ auth/generatetoken' , 'POST' ,
135
136
path_params ,
136
137
query_params ,
137
138
header_params ,
@@ -140,19 +141,19 @@ def auth_generatetoken_post_with_http_info(self, grant_type, username, password,
140
141
files = local_var_files ,
141
142
response_type = 'InlineResponse20015' , # noqa: E501
142
143
auth_settings = auth_settings ,
143
- async = params .get ('async' ),
144
- _return_http_data_only = params .get ('_return_http_data_only' ),
145
- _preload_content = params .get ('_preload_content' , True ),
146
- _request_timeout = params .get ('_request_timeout' ),
144
+ async = local_var_params .get ('async' ),
145
+ _return_http_data_only = local_var_params .get ('_return_http_data_only' ), # noqa: E501
146
+ _preload_content = local_var_params .get ('_preload_content' , True ),
147
+ _request_timeout = local_var_params .get ('_request_timeout' ),
147
148
collection_formats = collection_formats )
148
149
149
- def auth_validatetoken_get (self , ** kwargs ): # noqa: E501
150
+ def validate_token (self , ** kwargs ): # noqa: E501
150
151
"""Validate authentication token # noqa: E501
151
152
152
153
Validate the authentication token and get information about the user (roles, permissions, etc.) # noqa: E501
153
154
This method makes a synchronous HTTP request by default. To make an
154
155
asynchronous HTTP request, please pass async=True
155
- >>> thread = api.auth_validatetoken_get (async=True)
156
+ >>> thread = api.validate_token (async=True)
156
157
>>> result = thread.get()
157
158
158
159
:param async bool
@@ -162,18 +163,18 @@ def auth_validatetoken_get(self, **kwargs): # noqa: E501
162
163
"""
163
164
kwargs ['_return_http_data_only' ] = True
164
165
if kwargs .get ('async' ):
165
- return self .auth_validatetoken_get_with_http_info (** kwargs ) # noqa: E501
166
+ return self .validate_token_with_http_info (** kwargs ) # noqa: E501
166
167
else :
167
- (data ) = self .auth_validatetoken_get_with_http_info (** kwargs ) # noqa: E501
168
+ (data ) = self .validate_token_with_http_info (** kwargs ) # noqa: E501
168
169
return data
169
170
170
- def auth_validatetoken_get_with_http_info (self , ** kwargs ): # noqa: E501
171
+ def validate_token_with_http_info (self , ** kwargs ): # noqa: E501
171
172
"""Validate authentication token # noqa: E501
172
173
173
174
Validate the authentication token and get information about the user (roles, permissions, etc.) # noqa: E501
174
175
This method makes a synchronous HTTP request by default. To make an
175
176
asynchronous HTTP request, please pass async=True
176
- >>> thread = api.auth_validatetoken_get_with_http_info (async=True)
177
+ >>> thread = api.validate_token_with_http_info (async=True)
177
178
>>> result = thread.get()
178
179
179
180
:param async bool
@@ -182,21 +183,22 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
182
183
returns the request thread.
183
184
"""
184
185
186
+ local_var_params = locals ()
187
+
185
188
all_params = [] # noqa: E501
186
189
all_params .append ('async' )
187
190
all_params .append ('_return_http_data_only' )
188
191
all_params .append ('_preload_content' )
189
192
all_params .append ('_request_timeout' )
190
193
191
- params = locals ()
192
- for key , val in six .iteritems (params ['kwargs' ]):
194
+ for key , val in six .iteritems (local_var_params ['kwargs' ]):
193
195
if key not in all_params :
194
196
raise TypeError (
195
197
"Got an unexpected keyword argument '%s'"
196
- " to method auth_validatetoken_get " % key
198
+ " to method validate_token " % key
197
199
)
198
- params [key ] = val
199
- del params ['kwargs' ]
200
+ local_var_params [key ] = val
201
+ del local_var_params ['kwargs' ]
200
202
201
203
collection_formats = {}
202
204
@@ -218,7 +220,7 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
218
220
auth_settings = ['oAuth2' ] # noqa: E501
219
221
220
222
return self .api_client .call_api (
221
- '/auth/validatetoken/ ' , 'GET' ,
223
+ '/1.0.0/ auth/validatetoken' , 'GET' ,
222
224
path_params ,
223
225
query_params ,
224
226
header_params ,
@@ -227,8 +229,8 @@ def auth_validatetoken_get_with_http_info(self, **kwargs): # noqa: E501
227
229
files = local_var_files ,
228
230
response_type = 'InlineResponse20016' , # noqa: E501
229
231
auth_settings = auth_settings ,
230
- async = params .get ('async' ),
231
- _return_http_data_only = params .get ('_return_http_data_only' ),
232
- _preload_content = params .get ('_preload_content' , True ),
233
- _request_timeout = params .get ('_request_timeout' ),
232
+ async = local_var_params .get ('async' ),
233
+ _return_http_data_only = local_var_params .get ('_return_http_data_only' ), # noqa: E501
234
+ _preload_content = local_var_params .get ('_preload_content' , True ),
235
+ _request_timeout = local_var_params .get ('_request_timeout' ),
234
236
collection_formats = collection_formats )
0 commit comments