clef/instant2fa
Composer 安装命令:
composer require clef/instant2fa
包简介
A PHP client for Instant2FA.
README 文档
README
A PHP client for Instant2FA.
Installation
Install it with composer:
composer require clef/instant2fa
Requires PHP 5.4 or newer.
Usage
See our integration guide for a full walkthrough of the integration. The integration will take you about an hour.
Here's a flavor of the methods you'll be using:
$instant2fa = new \Instant2FA\Instant2FA([ 'access_key' => ACCESS_KEY, 'access_secret' => ACCESS_SECRET ]); $distinct_id = "A_UNIQUE_ID_FOR_A_GIVEN_USER"; // To show hosted 2FA settings: $hosted_page_url = $instant2fa->create_settings($distinct_id); // To show a hosted verification page: try { $hosted_page_url = $instant2fa->create_verification($distinct_id); // Redirect to 2FA verification page } catch (\Instant2FA\Error\MFANotEnabled $e) { // Log the user in as normal } // To see whether a user successfully completed 2FA verification: $succeeded = $instant2fa->confirm_verification($distinct_id, $request->input('instant2faToken'));
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-22