244
seCure develoPment For mobIle APPs
//possibly log out current session for safety
// Redirect the user to private page and exit script to stop
processing
redirectIt(SECURELOGIN);
//important to exit script and to stop any further processing
exit();
}
}
public function processFormNonce()
{
$n once = (isset($_POST['formNonce'])) ? $_POST['formNonce'] :
"";
//test for presence of valid form key,
// on error will redirect to secure login page with new key and
exit
self::validateFormNonce($nonce);
}
}
//instantiate a tracker
$nonceTracker = new NonceTracker();
Class NonceTracker Detail
Class NonceTracker has a single member variable, $nonces, which is an array that
holds two nonces: the current nonce and the previous nonce.
_ c o n str uc t()