Created
January 22, 2014 17:12
-
-
Save AngeloR/8562825 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include("Yubikey.php") | |
$id = 00000; | |
$signature = 'yoursignature'; | |
if(isset($_POST) && array_key_exists('otp', $_POST)) { | |
$token = new Yubikey($id, $signature); | |
if($token->verify($_POST['otp'])) { | |
echo 'Verified!'; | |
} | |
else { | |
echo 'Unverified...'; | |
} | |
} | |
?> | |
<!doctype html> | |
<html> | |
<body> | |
<form action="yubikey-demo.php" method="post"> | |
<input type="text" name="otp" value=""> | |
<button type="submit">Verify</button> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment