@@ -141,10 +141,10 @@ def set_cookie_response_mutator(
141141 expires : int ,
142142 path_type : Literal ["refresh_token_path" , "access_token_path" ],
143143 request : BaseRequest ,
144- user_context : Dict [str , Any ],
145144):
146145 def mutator (
147146 response : BaseResponse ,
147+ user_context : Dict [str , Any ],
148148 ):
149149 return _set_cookie (
150150 response , config , key , value , expires , path_type , request , user_context
@@ -161,6 +161,7 @@ def _attach_anti_csrf_header(response: BaseResponse, value: str):
161161def anti_csrf_response_mutator (value : str ):
162162 def mutator (
163163 response : BaseResponse ,
164+ _ : Dict [str , Any ],
164165 ):
165166 return _attach_anti_csrf_header (response , value )
166167
@@ -195,10 +196,10 @@ def clear_session_mutator(
195196 config : SessionConfig ,
196197 transfer_method : TokenTransferMethod ,
197198 request : BaseRequest ,
198- user_context : Dict [str , Any ],
199199):
200200 def mutator (
201201 response : BaseResponse ,
202+ user_context : Dict [str , Any ],
202203 ):
203204 return _clear_session (response , config , transfer_method , request , user_context )
204205
@@ -232,10 +233,10 @@ def clear_session_response_mutator(
232233 config : SessionConfig ,
233234 transfer_method : TokenTransferMethod ,
234235 request : BaseRequest ,
235- user_context : Dict [str , Any ],
236236):
237237 def mutator (
238238 response : BaseResponse ,
239+ user_context : Dict [str , Any ],
239240 ):
240241 return _clear_session (response , config , transfer_method , request , user_context )
241242
@@ -313,9 +314,8 @@ def token_response_mutator(
313314 expires : int ,
314315 transfer_method : TokenTransferMethod ,
315316 request : BaseRequest ,
316- user_context : Dict [str , Any ],
317317):
318- def mutator (response : BaseResponse ):
318+ def mutator (response : BaseResponse , user_context : Dict [ str , Any ], ):
319319 _set_token (
320320 response ,
321321 config ,
@@ -341,10 +341,9 @@ def access_token_mutator(
341341 config : SessionConfig ,
342342 transfer_method : TokenTransferMethod ,
343343 request : BaseRequest ,
344- user_context : Dict [str , Any ],
345344):
346345 def mutator (
347- response : BaseResponse ,
346+ response : BaseResponse , user_context : Dict [ str , Any ],
348347 ):
349348 _set_access_token_in_response (
350349 response ,
0 commit comments