mythicalsystems/google-authenticator

将Google Authenticator集成到PHP项目的库

2.0.0 2024-09-14 10:02 UTC

This package is auto-updated.

Last update: 2024-09-14 10:04:00 UTC


README

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

https://github.com/sonata-project/GoogleAuthenticator 分支而来

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

为什么分支?

这个分支只是为了不显示旧项目已废弃的错误!

Latest Stable Version Latest Unstable Version License

Total Downloads Monthly Downloads Daily Downloads

使用Composer安装

composer require mythicalsystems/google-authenticator

使用方法

查看example.php了解如何使用它。

在web/中有一个小型web应用程序展示了它的工作原理,请确保webserver可以对users.dat进行写操作,否则它不会真正工作(因为它无法保存密钥)。尝试使用chregu/foobar进行登录。

示例中缺少的内容

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

支持

对于一般支持和问题,请使用 StackOverflow

如果您认为您找到了一个错误,或者您有一个功能想法要提出,请自由地打开一个问题 在查看 贡献指南 之后。

许可

此软件包可在 MIT许可 下使用。