renangaleno / phpgoogleauthenticator
处理 Google Authenticator 双因素认证的 PHP 类
0.1
2015-09-09 10:06 UTC
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-09-08 09:08:21 UTC
README
此 PHP 类可用于与 Google Authenticator 移动应用进行交互,以进行双因素认证。此类可以生成密钥、生成代码、验证代码并显示用于扫描密钥的二维码。
为了安全安装,您必须确保使用的代码不能被重复使用(重放攻击)。
用法
查看示例文件
php example1.php
Secret is: OQB6ZZGYHCPSX4AK
Google Charts URL for the QR-Code: https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/infoATphpgangsta.de%3Fsecret%3DOQB6ZZGYHCPSX4AK
Checking Code '848634' and Secret 'OQB6ZZGYHCPSX4AK':
OK
作者
Renan Galeno
Michael Kliewe
许可
在 BSD 许可证下授权。