mirror of
https://github.com/itflow-org/itflow
synced 2026-03-03 12:24:51 +00:00
Implemented 2FA TOTP with Google Authenticator
This commit is contained in:
16
test.php
16
test.php
@@ -22,6 +22,22 @@
|
||||
<h1>User Agent: <?php echo $_SERVER['HTTP_USER_AGENT']; ?>
|
||||
<p>This is a great starting point for new custom pages.</p>
|
||||
|
||||
<?php
|
||||
require_once('rfc6238.php');
|
||||
|
||||
$secretkey = 'GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQ';
|
||||
$currentcode = '739453';
|
||||
if (TokenAuth6238::verify($secretkey,$currentcode)) {
|
||||
echo "Code is valid\n";
|
||||
} else {
|
||||
echo "Invalid code\n";
|
||||
}
|
||||
print sprintf('<img src="%s"/>',TokenAuth6238::getBarCodeUrl('','',$secretkey,'My%20App'));
|
||||
print TokenAuth6238::getTokenCodeDebug($secretkey,0);
|
||||
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<h3><?php echo $config_quote_email_subject; ?></h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user