I hereby claim:
- I am benmmurphy on github.
- I am benmmurphy (https://keybase.io/benmmurphy) on keybase.
- I have a public key whose fingerprint is 00A5 6C45 F31E F22D 756A 6056 7B8B 0822 23EE 18E2
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| $client->msisdn_verification_status($session); | |
| ?> |
| <?php | |
| $user = USERS[$username]; | |
| try { | |
| $verify->verify_response($user["msisdn"]); | |
| header("Location: /login_success.php"); | |
| } catch (Exception $e) { | |
| header("Location: /login_fail.php"); | |
| } | |
| ?> |
| <script type='text/javascript' src='https://verify.zensend.io/assets/msisdn_verification.js'></script> | |
| <div id="z-msisdn-verification" data-callback-url="<?php echo $callback_url ?>" data-session="<?php echo $session ?>"></div> |
| <?php $verify->write_tags("http://" . $_SERVER['HTTP_HOST'] . "/msisdn_verify.php"); ?> |
| <?php | |
| $client = new ZenSend\Client(API_KEY); | |
| $options = new ZenSend\VerifyOptions(); | |
| $options->message = "{{token}} is your COMPANY verification code"; | |
| $options->originator = "YOURCOMPANY"; | |
| $verify->create_session($user["msisdn"], $options); | |
| $session = $client->create_msisdn_verification($msisdn, $options); | |
| ?> |
| <?php | |
| $verify = new ZenSend\Verify(API_KEY); | |
| $username = $_POST["username"]; | |
| $user = USERS[$username]; | |
| if ($user && $user["password"] == $_POST["password"]) { | |
| session_start(); | |
| $_SESSION["username"] = $username; | |
| $options = new ZenSend\VerifyOptions(); |
| Host * !gateway !*.* | |
| HostName %h.internal.domain | |
| ProxyCommand ssh gateway exec nc %h %p |
| <?php | |
| $details["attempts"] = $details["attempts"] + 1; | |
| $_SESSION["msisdn_verification"] = $details; | |
| if ($details["attempts"] >= MAX_VERIFY_ATTEMPTS) { | |
| return "max_attempts"; | |
| } else { | |
| return "invalid_token"; | |
| } | |
| ?> |
| <?php | |
| if (hash_equals($token, $details["token"])) { | |
| $_SESSION["verified_msisdn"] = $details["msisdn"]; | |
| unset($_SESSION["msisdn_verification"]); | |
| return TRUE; | |
| } | |
| ?> |