4545 ('Pragma', 'no-cache'),
4646 ('Cache-Control', 'no-store')
4747 ],
48- 'cookie': _list of cookies_
48+ 'cookie': _list of cookies_,
49+ 'response_placement': 'body'
4950}
5051
5152"response" MUST be present
5253"http_headers" MAY be present
5354"cookie": MAY be present
55+ "response_placement": If absent defaults the endpoints response_placement parameter value
56+ or if that is also missing 'url'
5457"""
5558
5659
@@ -341,7 +344,7 @@ def do_response(self, response_args=None, request=None, error="", **kwargs):
341344 do_placement = True
342345 content_type = "text/html"
343346 _resp = {}
344-
347+ _response_placement = None
345348 if response_args is None :
346349 response_args = {}
347350
@@ -354,6 +357,7 @@ def do_response(self, response_args=None, request=None, error="", **kwargs):
354357 pass
355358 elif "response_msg" in kwargs :
356359 resp = kwargs ["response_msg" ]
360+ _response_placement = kwargs .get ('response_placement' )
357361 do_placement = False
358362 _response = ""
359363 content_type = kwargs .get ('content_type' )
@@ -408,6 +412,9 @@ def do_response(self, response_args=None, request=None, error="", **kwargs):
408412 except KeyError :
409413 http_headers = []
410414
415+ if _response_placement :
416+ _resp ["response_placement" ] = _response_placement
417+
411418 http_headers .extend (OAUTH2_NOCACHE_HEADERS )
412419
413420 _resp .update ({"response" : resp , "http_headers" : http_headers })
0 commit comments