Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 140 | All time: 9,211 This week: 71 |
Version | License | PHP version | Categories | |||
multi_factor 1.0 | MIT/X Consortium ... | 7 | Cryptography, Security, PHP 7 |
Description | Author | |
This package implements 2 factor authentication independent of the vendor. |
Designed to be a vendor-agnostic implementation of various Two-Factor Authentication solutions.
Developed by Paragon Initiative Enterprises for use in our own projects. It's released under a dual license: GPL and MIT. As with all dual-licensed projects, feel free to choose the license that fits your needs.
composer require paragonie/multi-factor
<?php
use ParagonIE\MultiFactor\OneTime;
use ParagonIE\MultiFactor\OTP\TOTP;
$seed = random_bytes(20);
// You can use TOTP or HOTP
$otp = new OneTime($seed, new TOTP());
if (\password_verify($_POST['password'], $storedHash)) {
if ($otp->validateCode($_POST['2facode'])) {
// Login successful
}
}
Files (20) |
File | Role | Description | ||
---|---|---|---|---|
src (2 files, 2 directories) | ||||
test (3 files, 1 directory) | ||||
.travis.yml | Data | Auxiliary data | ||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
phpunit.xml.dist | Data | Auxiliary data | ||
psalm.baseline.xml | Data | Auxiliary data | ||
psalm.xml | Data | Auxiliary data | ||
README.md | Doc. | Read me |
Files (20) | / | src |
File | Role | Description | ||
---|---|---|---|---|
OTP (3 files) | ||||
Vendor (1 file) | ||||
MultiFactorInterface.php | Class | Class source | ||
OneTime.php | Class | Class source |
Files (20) | / | src | / | OTP |
File | Role | Description |
---|---|---|
HOTP.php | Class | Class source |
OTPInterface.php | Class | Class source |
TOTP.php | Class | Class source |
Files (20) | / | test |
File | Role | Description | ||
---|---|---|---|---|
fixtures (4 files) | ||||
GoogleAuthTest.php | Class | Class source | ||
HOTPTest.php | Class | Class source | ||
TOTPTest.php | Class | Class source |
Files (20) | / | test | / | fixtures |
File | Role | Description |
---|---|---|
01af3168cf7dbe47c7...6545389a.qrcode.txt | Doc. | Documentation |
3532ed4f5457b06c9e...d9f22bce.qrcode.txt | Doc. | Documentation |
68aa8b264cdc6ddc8a...4ca87a06.qrcode.txt | Doc. | Documentation |
9efd625902fbeedfda...af65cae5.qrcode.txt | Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.