MCPcopy Create free account
hub / github.com/AstroPrint/AstroBox / f

Method f

src/octoprint/server/__init__.py:528–539  ·  view source on GitHub ↗

Creates a custom wsgi and Flask request context in order to be able to process user information stored in the current session. :param request: The Tornado request for which to create the environment and context

(request)

Source from the content-addressed store, hash-verified

526 :return: an access validation wrapper taking a request as parameter and performing the request validation
527 """
528 def f(request):
529 """
530 Creates a custom wsgi and Flask request context in order to be able to process user information
531 stored in the current session.
532
533 :param request: The Tornado request for which to create the environment and context
534 """
535 wsgi_environ = tornado.wsgi.WSGIContainer.environ(request)
536 with app.request_context(wsgi_environ):
537 app.session_interface.open_session(app, request)
538 loginManager.reload_user()
539 validator(request)
540 return f
541
542 self._tornado_app = Application(self._router.urls + [

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected