def login_required(self, fresh=False, redirect_to=None):
        """Ensures that a user is authenticated
        """
        if not self.logged_in() or (fresh and not self.login_manager.login_fresh()):
            if redirect_to:
                resp = redirect(redirect_to)
            else:
                resp = self.login_manager.unauthorized()
            current_context.exit(resp, trigger_action_group="missing_user")
def login_required ( self , fresh = False , redirect_to = None ) : if not self . logged_in ( ) or ( fresh and not self . login_manager . login_fresh ( ) ) : if redirect_to : resp = redirect ( redirect_to ) else : resp = self . login_manager . unauthorized ( ) current_context . exit ( resp , trigger_action_group = "missing_user" )
Ensures that a user is authenticated