Download the PHP package xphere/one-time-access-bundle without Composer
On this page you can find all versions of the php package xphere/one-time-access-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download xphere/one-time-access-bundle
More information about xphere/one-time-access-bundle
Files in xphere/one-time-access-bundle
Package one-time-access-bundle
Short Description Authenticate your users in a Symfony2 application through a one-time access url
License MIT
Homepage https://github.com/xphere/OneTimeAccessBundle
Informations about the package one-time-access-bundle
xphere/one-time-access-bundle
Do you ever wanted to authenticate your users in a Symfony2 application through a one-time access url?
Seek no more! This is your bundle! :D
⚠ Note ⚠
Mind the package rename
- Before
1.0.0
:berny/one-time-access-bundle
- After
1.0.0
:xphere/one-time-access-bundle
Why I would want that?
You can use one-time access urls for:
- Access to "Forgot your password?" forms
- Password-less systems
Features
- Customizable urls
- User defined token generation and retrieval
- Multiple firewalls
Compatibility
Tested under Symfony2 2.1.1 and greater
Installation
From composer/packagist
- Add
"xphere/one-time-access-bundle": "^1.1"
to yourcomposer.json
file - Add the bundle to your kernel with
new xPheRe\OneTimeAccessBundle\xPheReOneTimeAccessBundle()
Usage
Add a one_time_access
key in any firewall with, at least, a route
.
The current user provider must implement OneTimeAccessBundle\Security\Provider\ProviderInterface
.
You can set the ota_provider
key to define a different service implementing the interface.
By default, route
must have a _token
parameter to extract the one-time access token.
This can be customized with the parameter
key.
Of course, you can define your routes as always, using YAML, XML, annotations... you name it.
Token generation
This bundle doesn't cover token generation. It's up to you to create unique tokens and link them to the user.
This could be part of a Doctrine implementation:
Route generation
Route generation is up to you too. Yes! Are we being lazy, you say? Nope! This means FULLY CUSTOMIZABLE routes for your one-time access links.
For example: