hanhan/google-authenticator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2024-10-12