Download the PHP package listfixer/yii2-remember-me without Composer

On this page you can find all versions of the php package listfixer/yii2-remember-me. 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 yii2-remember-me

yii2-remember-me

This extension replaces the standard "Remember Me" identity cookie functionality of Yii2 with something similar to what is described here: https://gist.github.com/oleg-andreyev/9dcef18ca3687e12a071648c1abff782

When a user requests "Remember Me" during login, a new identity cookie is created for that user for that browser/computer. The cookie contains three things which are also stored in a database table: (1) a Cookie ID, which is the record number in the identity cookie database table, (2) A Cookie Key, which is the "password" for that particular cookie, and (3) A User Key, which is the "password" for the associated user. When I say "password", it is a random string, not an actual password. The database stores some other information, including the User ID number.

Each time a user restarts their browser and is authenticated using this system, all three items are checked against the database. If the contents of the cookie match a record in the database, the user gains access to the system and a new User Key is generated. The new User Key is stored in the database and in the identity cookie.

If a particular user uses three different computers, then there will be three different records in the database, one for each cookie. When each of these cookies is used to authenticate a user, the User Key for that particular cookie is regenerated, leaving the other identity cookie User Keys unchanged. This allows a particular user to have "Remember Me" functionality on multiple computers, yet still have their User Key change with each use.

If someone copies or steals an identity cookie, whichever cookie is used first (the original or the copy) will still work, since there is no way to determine which is the original and which is the copy. The User Key will match and a new User Key will be generated. Once the other cookie is used, the User Key will have already changed. The Cookie ID and Cookie Key will match, but the User Key will not, thus indicating that more than one identity cookies exists with this Cookie ID and Cookie Key. The database record is then deleted, thus disabling all cookies with this Cookie ID and Cookie Key.

To create the database table, use this command from your Yii2 application base directory:

php ./yii migrate --migrationPath=@vendor/listfixer/yii2-remember-me/migrations

The database migration assumes that you have a table called "user" with an integer primary key called "id".

To enable this extension, edit your configuration file to include this component information:

'components' => [ 'user' => [ 'class' => 'listfixer\remember\RememberMe', 'identityClass' => / you should already have something here /, 'enableAutoLogin' => true, ] ]

When a user changes their password, you can configure your system to disable all existing identity cookies for that user by invoking this method:

\listfixer\remember\models\UserIdentityCookie::deleteUserCookies( $this->id );

If you are using the Yii2 Advanced template, then this should be added to setPassword() in common/models/User.php.


All versions of yii2-remember-me with dependencies

PHP Build Version
Package Version
Requires yiisoft/yii2 Version ^2.0.10
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 listfixer/yii2-remember-me contains the following files

Loading the files please wait ...