Provides nonce login tickets to users who have forgot their password.
Provides nonce login tickets to users who forgot their password, allowing them to reset their password and login in the mean time.
Tickets are requested with the NonceLoginRequestOperation operation. The
api:inline-nonce-login-request routes can be used to format a URL
for this operation. The operation can only be performed with the
POST HTTP method.
<?php use ICanBoogie\HTTP\Request; $app = ICanBoogie\app(); $request = Request::from([ 'uri' => $app->routes['api:nonce-login-request'], 'is_post' => true, 'is_xhr' => true, 'request_params' => [ 'email' => "firstname.lastname@example.org" ] ]); # or $request = Request::from([ 'uri' => $app->routes['api:inline-nonce-login-request']->format(['email' => "email@example.com"]), 'is_post' => true, 'is_xhr' => true ]);
To prevent abuses, a cooldown period is required before another ticket can be requested for the same user. A TicketAlreadySent exception is thrown in attempt to request a ticket before the end of that period.
If everything goes well, a message is sent to the user with a link to a NonceLoginForm.
The message is sent by an event hook attached to the
event, using the
mail() prototype method, which is usually provided by the icanboogie/mailer
ICanBoogie\Core::mail() method is provided by the icanboogie/mailer package,
Icybee\Modules\Users\NonceLogin\NonceLoginRequestOperation::mail:before event can be used to
alter the message or the mailer sending it.
The following exception are defined:
- TicketAlreadySent: Exception thrown in attempt to request a ticket before the end of the cooldown period.
The package requires PHP 5.4 or later.
The recommended way to install this package is through Composer:
$ composer require icybee/module-users-noncelogin
This module is part of the modules required by Icybee.
The package is available on GitHub, its repository can be cloned with the following command line:
$ git clone https://github.com/Icybee/module-users-noncelogin.git users.noncelogin
The package is documented as part of the Icybee CMS
documentation. The documentation for the package and its
dependencies can be generated with the
make doc command. The documentation is generated in
docs directory using ApiGen. The package directory can later by
cleaned with the
make clean command.
The test suite is ran with the
make test command. Composer is
automatically installed as well as all the dependencies required to run the suite. The package
directory can later be cleaned with the
make clean command.
The package is continuously tested by Travis CI.
The module is licensed under the New BSD License - See the LICENSE file for details.