This Code describes a module to allow Login with a token alone (as opposed to username+password).
To achieve this we do the following: username and token are semantically swapped as
- we can not have one username having multiple passwords.
- but we can have different user names always having the same password! The token which technically is the username will serve as the password.
Changes to the regular login process
- Extend the regular login module (
ModuleTokenlogin extends \ModuleLogin)
- Provide a special login form that takes care of the changes. This form will not have a password field.
- Set the (
POST-)value so the regular login module will be happy.
- Register a method for the
importUserhook that creates a new member. See classes/MyHooks::importFromTokenlist() for an example.