hanhan/google-authenticator
最新稳定版本:1.0.0
Composer 安装命令:
composer require hanhan/google-authenticator
包简介
Google身份验证器,Google两步验证, Google Authenticator,Google Authenticator 2-factor authentication
关键字:
README 文档
README
Google身份验证器, Google两步验证,Google Authenticator, 2-factor authentication
<?php require_once 'Hanhan/GoogleAuthenticator.php'; $google = new GoogleAuthenticator(); $secret = $google->createSecret(); echo "Secret is: ".$secret."\n\n"; $qrCodeUrl = $google->getQRCodeGoogleUrl('Blog', $secret); echo "Google Charts URL for the QR-Code: ".$qrCodeUrl."\n\n"; $oneCode = $google->getCode($secret); echo "Checking Code '$oneCode' and Secret '$secret':\n"; $checkResult = $google->verifyCode($secret, $oneCode, 2); // 2 = 2*30sec clock tolerance if ($checkResult) { echo 'OK'; } else { echo 'FAILED'; }
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2024-10-12