muonium/google-authenticator

该软件包已废弃,不再维护。未建议替代包。

库,用于将Google Authenticator集成到PHP项目中

2.2.0 2018-05-22 20:45 UTC

This package is not auto-updated.

Last update: 2020-07-02 08:32:05 UTC


README

Build Status

http://code.google.com/p/google-authenticator/ 转移而来

您可以从这里使用Google Authenticator应用程序生成一次性密码/令牌,并使用这个小巧的PHP应用程序进行验证(当然,您也可以用这个生成它们):http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=1066447

使用Composer安装

添加依赖项

php composer.phar require sonata-project/google-authenticator

如果要求指定版本,请输入 'dev-master'(除非您需要其他版本)

Please provide a version constraint for the sonata-project/google-authenticator requirement: dev-master

使用方法

请参阅example.php了解如何使用它。

web/目录中有一个小型的Web应用程序展示了其工作原理,请确保webserver对users.dat具有可写权限,否则可能无法正常工作(因为它无法保存密钥)。尝试使用chregu/foobar进行登录。

示例中缺少的内容

  • 防止重放攻击。一个令牌应该只使用一次
  • 仅在再次提供密码时显示二维码(或根本不显示)
  • 重新生成密钥

Google Groups

对于问题和建议,您可以在以下Google Groups上发布