(self, post_vars)
Verifies the csrf signature and form name.
Verifies the csrf signature and form name.
Verifies the csrf signature and form name .
def _verify_form(self, post_vars):
        """Verifies the csrf signature and form name."""
        if post_vars.get("_formname") != self.form_name:
            return False
        token = post_vars.get("_formkey")
        key = self._get_key()
        if not key:
            return False
        try:
            jwt.decode(token, key, algorithms=["HS256"])
            return True
        except:
            return False
def _verify_form ( self , post_vars ) : if post_vars . get ( "_formname" ) != self . form_name : return False token = post_vars . get ( "_formkey" ) key = self . _get_key ( ) if not key : return False try : jwt . decode ( token , key , algorithms = [ "HS256" ] ) return True except : return False