johnstyle / google-authenticator
PHP 5 Google Authenticator
v1.0.8
2015-01-05 19:47 UTC
Requires
- php: >=5.4.0
- christian-riesen/base32: 1.2
README
Google Authenticator
##使用方法
###步骤 1 - 注册应用程序
$google = new GoogleAuthenticator(); // Register application echo $google->getQRCodeUrl('MyApplicationName'); // Save secret Key $secretKey = $google->getSecretKey();
###步骤 2 - 验证代码
$google = new GoogleAuthenticator($secretKey); // User submit code $userSubmitCode = ''; // Verify Code if ($google->verifyCode($userSubmitCode)) { // OK }
##演示 演示