This section walks you through the steps involved in implementing the Block page as an add-on to the ShieldSquare service.
This guide requires a complete working integration of the connectors or the REST API.
Pseudo Code for Active Mode
INCLUDE ShieldSquare library. INITIALIZED userId, pid to empty. INITIALIZED call type to 1. CALL shieldsquare_ValidateRequest(Arguments) IF responseCode is equal to 1 THEN Print "Allow Request". ELSEIF responseCode is equal to 3 THEN Redirect to Block page. |
On the block, the page makes another call to the Radware Bot Manager API by passing the call type parameter with value 4. This is to let the service know that a Block has been implemented.
Sample Block Page Code
<html> <head> INITIALIZED userId, pid to empty. INITIALIZED call type to 4. CALL shieldsquare_ValidateRequest(Arguments) </head> <body> <p> class="lead">We have detected some suspicious activity from this computer, due to which we have blocked your access to this site. Please complete the form and submit to unblock your access .</p> <form id="unblockForm" method="post" action="Post this to a file which will persist these details"> <div id="first_name"> <label for="input_first_name">First Name:</label> <input type="text" id="input_first_name" name="first_name" value="" /> </div> <div id="last_name"> <label for="input_last_name">Last Name:</label> <input type="text" id="input_last_name" name="last_name" value="" /> </div> <div id="email"> <label for="input_email">E-mail:</label> <input type="text" id="input_email" name="email" value="" /> </div> <div id="city" style="display: none"> <label for="input_city">City (Leave Blank):</label> <input type="text" id="input_city" name="city" value="" /> </div> <div id="unblock"> <input id="input_unblock" name="unblock" type="submit" value="Request Unblock" /> </div> </form> </body> </html> |
It is recommended to add a form to collect user details so that certain users can be unblocked. The form can POST the details to a file which will persist the details.
This should be a server-side redirect. |