@@ -137,7 +137,7 @@ def initialize(self, oauthlib_server, error_uri=None):
137
137
def create_token_response (self , credentials = None ):
138
138
def decorator (f ):
139
139
@functools .wraps (f )
140
- def wrapper ():
140
+ def wrapper (* args , ** kwargs ):
141
141
assert self ._oauthlib , "BottleOAuth2 not initialized with OAuthLib"
142
142
143
143
# Get any additional creds
@@ -156,7 +156,7 @@ def wrapper():
156
156
set_response (bottle .request , bottle .response , resp_status ,
157
157
resp_headers , resp_body )
158
158
159
- func_response = f ()
159
+ func_response = f (* args , ** kwargs )
160
160
if func_response :
161
161
return func_response
162
162
return bottle .response
@@ -166,7 +166,7 @@ def wrapper():
166
166
def verify_request (self , scopes = None ):
167
167
def decorator (f ):
168
168
@functools .wraps (f )
169
- def wrapper ():
169
+ def wrapper (* args , ** kwargs ):
170
170
assert self ._oauthlib , "BottleOAuth2 not initialized with OAuthLib"
171
171
172
172
# Get the list of scopes
@@ -185,7 +185,7 @@ def wrapper():
185
185
'scopes' : req .scopes
186
186
})
187
187
if valid :
188
- return f ()
188
+ return f (* args , ** kwargs )
189
189
190
190
# Framework specific HTTP 403
191
191
return HTTPError (403 , "Permission denied" )
@@ -195,7 +195,7 @@ def wrapper():
195
195
def create_introspect_response (self ):
196
196
def decorator (f ):
197
197
@functools .wraps (f )
198
- def wrapper ():
198
+ def wrapper (* args , ** kwargs ):
199
199
assert self ._oauthlib , "BottleOAuth2 not initialized with OAuthLib"
200
200
201
201
uri , http_method , body , headers = extract_params (bottle .request )
@@ -209,7 +209,7 @@ def wrapper():
209
209
set_response (bottle .request , bottle .response , resp_status , resp_headers ,
210
210
resp_body , force_json = True )
211
211
212
- func_response = f ()
212
+ func_response = f (* args , ** kwargs )
213
213
if func_response :
214
214
return func_response
215
215
return bottle .response
@@ -219,7 +219,7 @@ def wrapper():
219
219
def create_authorization_response (self ):
220
220
def decorator (f ):
221
221
@functools .wraps (f )
222
- def wrapper ():
222
+ def wrapper (* args , ** kwargs ):
223
223
assert self ._oauthlib , "BottleOAuth2 not initialized with OAuthLib"
224
224
225
225
uri , http_method , body , headers = extract_params (bottle .request )
@@ -239,7 +239,7 @@ def wrapper():
239
239
resp_headers , resp_body , resp_status = {}, e .json , e .status_code
240
240
set_response (bottle .request , bottle .response , resp_status , resp_headers , resp_body )
241
241
242
- func_response = f ()
242
+ func_response = f (* args , ** kwargs )
243
243
if func_response :
244
244
return func_response
245
245
return bottle .response
@@ -249,7 +249,7 @@ def wrapper():
249
249
def create_revocation_response (self ):
250
250
def decorator (f ):
251
251
@functools .wraps (f )
252
- def wrapper ():
252
+ def wrapper (* args , ** kwargs ):
253
253
assert self ._oauthlib , "BottleOAuth2 not initialized with OAuthLib"
254
254
255
255
uri , http_method , body , headers = extract_params (bottle .request )
@@ -263,7 +263,7 @@ def wrapper():
263
263
264
264
set_response (bottle .request , bottle .response , resp_status , resp_headers , resp_body )
265
265
266
- func_response = f ()
266
+ func_response = f (* args , ** kwargs )
267
267
if func_response :
268
268
return func_response
269
269
return bottle .response
0 commit comments