ltm rule command ASM captcha statusΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



ASM::captcha_status
       Returns the status of the user's answer to the CAPTCHA challenge.

SYNOPSIS
       ASM::captcha_status

DESCRIPTION
       Returns the status of the user's answer to the CAPTCHA challenge. The
       returned value is one of the following strings: not_received - the
       answer to the CAPTCHA challenge did not appear in the request; this is
       the normal result, before the CAPTCHA challenge is sent to the client
       correct - the answer is correct incorrect - the answer is incorrect
       empty - an empty answer was given, or if the user clicked on the
       CAPTCHA Refresh button expired - the answer has expired; in this case,
       the answer is not validated and may be correct or incorrect invalid -
       the cookie containing the CAPTCHA answer cannot be parsed; this could
       mean that it was modified by an attacker, or that it is older than two
       days, or due to a configuration change bot_detected - bad response to
       CAPTCHA: non-human behavior was detected in CAPTCHA page

		Syntax

       ASM::captcha_status

RETURN VALUE
       Returns a string signifying the status of the CAPTCHA challenge.

VALID DURING
       ASM_REQUEST_DONE, ASM_REQUEST_VIOLATION

EXAMPLES
	# EXAMPLE: Send a CAPTCHA challenge on the login page, and only allow the
	# login if the user passed the CAPTCHA challenge
	when ASM_REQUEST_DONE {
	    if {[ASM::captcha_status] ne "correct"} {
		if {[HTTP::uri] eq "/t/login.php"} {
		    set res [ASM::captcha]
		    if {$res ne "ok"} {
			log local0. "cannot send captcha_challenge: \"$res\""
		    }
		}
	    }
	}

HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-11.5.0
		--First introduced the command.



BIG-IP				  2018-07-19			      iRule(1)