项目作者: johnstyle

项目描述 :
Google Authenticator
高级语言: PHP
项目地址: git://github.com/johnstyle/google-authenticator.git
创建时间: 2014-09-02T19:38:20Z
项目社区:https://github.com/johnstyle/google-authenticator

开源协议:GNU General Public License v3.0

下载


Google-Authenticator Flattr this

Latest Stable Version
Total Downloads
Build Status
Dependency Status
SensioLabsInsight

Google Authenticator

Usage

Step 1 - Register application

  1. $google = new GoogleAuthenticator();
  2. // Register application
  3. echo $google->getQRCodeUrl('MyApplicationName');
  4. // Save secret Key
  5. $secretKey = $google->getSecretKey();

Step 2 - Verify Code

  1. $google = new GoogleAuthenticator($secretKey);
  2. // User submit code
  3. $userSubmitCode = '';
  4. // Verify Code
  5. if ($google->verifyCode($userSubmitCode)) {
  6. // OK
  7. }

Demonstration

Demonstration