original_docstring: 
      Validate an incoming session and only proceed with a decoded session if the session is valid,
      otherwise render the not-logged-in page.
  
      :param request: The current request object
      
docstring: Validate an incoming session and only proceed with a decoded session if the session is valid,
  otherwise render the not-logged-in page.
docstring_tokens: Validate an incoming session and only proceed with a decoded session if the session is valid otherwise render the not - logged - in page .
code: def jwt_session(request):
      """
      Validate an incoming session and only proceed with a decoded session if the session is valid,
      otherwise render the not-logged-in page.
  
      :param request: The current request object
      """
      def extract_session(original_function):
          @wraps(original_function)
          def extract_session_wrapper(*args, **kwargs):
              if 'authorization' in request.cookies:
                  session = ons_env.jwt.decode(request.cookies['authorization'])
              else:
                  session = None
              if not session:
                  return render_template('not-signed-in.html', _theme='default', data={"error": {"type": "failed"}})
              return original_function(session, **kwargs)
          return extract_session_wrapper
      return extract_session
code_tokens: def jwt_session ( request ) : def extract_session ( original_function ) : @ wraps ( original_function ) def extract_session_wrapper ( * args , ** kwargs ) : if 'authorization' in request . cookies : session = ons_env . jwt . decode ( request . cookies [ 'authorization' ] ) else : session = None if not session : return render_template ( 'not-signed-in.html' , _theme = 'default' , data = { "error" : { "type" : "failed" } } ) return original_function ( session , ** kwargs ) return extract_session_wrapper return extract_session
short_docstring: Validate an incoming session and only proceed with a decoded session if the session is valid,
  otherwise render the not-logged-in page.
short_docstring_tokens: Validate an incoming session and only proceed with a decoded session if the session is valid otherwise render the not - logged - in page .
comment: """
      Validate an incoming session and only proceed with a decoded session if the session is valid,
      otherwise render the not-logged-in page.
  
      :param request: The current request object
      """