| Package Data | |
|---|---|
| Maintainer Username: | abelorosz |
| Maintainer Contact: | abel.orosz@me.com (Abel Orosz) |
| Package Create Date: | 2014-02-21 |
| Package Last Update: | 2019-07-11 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-06 15:05:42 |
| Package Statistics | |
|---|---|
| Total Downloads: | 903 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 10 |
| Total Watchers: | 1 |
| Total Forks: | 3 |
| Total Open Issues: | 1 |
Twostep is a PHP version of Google's two-step authentication library. The package includes ServiceProviders and Facades for easy Laravel 4 integration.
Twostep::generateSecret() for generating the secret keyTwostep::checkCode(code, secret) for checking the codeTwostep::getUrl(user, hostname, secret) for generating the QR code urlTwostep::getCode(secret, ?time) for generating a code (for a given time)The best way to install Twostep is quickly and easily with Composer.
Twostep is available via Packagist.
Require the package via Composer in your composer.json.
"abelorosz/twostep": "dev-master"
Run Composer to install or update the new requirement.
$ php composer.phar install
or
$ php composer.phar update
Now you are able to require the vendor/autoload.php file to PSR-0 autoload the library.
Twostep has optional support for Laravel 4 and comes with a Service Provider and Facades for easy integration. After you have installed Twostep correctly, just follow the instructions.
Open your Laravel config file config/app.php and add the following lines.
In the $providers array add the service providers for this package.
'Abelorosz\Twostep\TwostepServiceProvider',
Add the facade of this package to the $aliases array.
'Twostep' => 'Abelorosz\Twostep\Facades\Twostep',
Now Twostep will be auto-loaded by Laravel.
Twostep is licensed under the MIT License.
Copyright (c) 2014 Abel Orosz