How to use the appier.base.SecurityError function in appier

To help you get started, we’ve selected a few appier examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hivesolutions / appier / src / appier / parts / captcha / part.py View on Github external
def verify(self, value):
        captcha = self.session.get("captcha", None)
        if captcha: del self.session["captcha"]
        if not captcha: raise appier.base.SecurityError(
            message = "No captcha available",
            error_code = 401
        )
        if not value == captcha: raise appier.base.SecurityError(
            message = "Invalid captcha value",
            error_code = 401
        )