Download the PHP package danielgelling/twofactor without Composer

On this page you can find all versions of the php package danielgelling/twofactor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package twofactor

Two Factor Authentication Wordpress Admin Plugin

Total Downloads Latest Stable Version Latest Unstable Version License

TwoFactorAuth is a Wordpress plugin that will add an extra layer of security to your Wordpress installation. It sends a text message via the MessageBird API when someone tries to login to the Wordpress Admin.

Installation

Via composer

Installating the TwoFactorAuth plugin is a breeze with composer. You can get composer at https://getcomposer.org/.

composer require danielgelling/twofactor:^1.0

Via Github

Installing the TwoFactorAuth plugin via Github can either be done by cloning the repository into the wp-content/plugins directory or downloading a zip file from the repo page.

$ cd /path/to/project/wp-content/plugins
$ git clone https://github.com/danielgelling/twofactorauth.git --branch noob --single-branch twofactorauth

Or unzip the zipped plugin file into the plugins directory.

Configuration

Turning on the lights

First we'll need to add the plugins configuration file to wp-config.php. We can do this by adding the following:

/*
|--------------------------------------------------------------------------
| Two Factor Authentication Configuration
|--------------------------------------------------------------------------
|
| Here we require the configuration file for the twofactorauth plugin.
|
*/

require_once dirname(__FILE__) . '/wp-content/plugins/twofactorauth/config.php';

Then we need to copy the example config file by executing the following command in the shell (assuming we are in the wp-content/plugins/twofactorauth directory):

$ cp config.example.php config.php

Having done this, we can add our MessageBird API key, the amount of days after which we want to prompt the user to authenticate himself by a text message (so how long an auth_code will be valid) we do this in days and the database table we want to use to store our auth_codes):

define('MESSAGEBIRD_API_KEY', 'live_S0m3Rand0MapiKeY');
define('TWO_FACTOR_EXPIRES_IN', 30);
define('TWO_FACTOR_AUTH_TABLE', 'two_factor_logins');

Then we want to define the sender and the content of the text message:

define('CODE_TEXT_MESSAGE_SENDER', 'Your company\'s name');
define('CODE_TEXT_MESSAGE_CONTENT', 'Your code is: ');

Least but not last, we need to define our invalid code error message:

define('CODE_INVALID_MESSAGE', 'Invalid code');
define(
    'CODE_INVALID_MESSAGE_DESCRIPTION',
    'You provided an invalid authentication code.'
);

Activating the plugin

The last thing we need to do is activate the plugin in the wp-admin. This will be the last time you sign in without Two Factor Authentication, at least for the amount of days you specify to prompt for a new authentication.

So, the only thing we need to do now is click activate and our Wordpress Admin is more secure. Awesome!


All versions of twofactor with dependencies

PHP Build Version
Package Version
Requires php Version 5.5.*
messagebird/php-rest-api Version 1.4.x
illuminate/database Version 5.2.7
nesbot/carbon Version ~1.14
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danielgelling/twofactor contains the following files

Loading the files please wait ....