Lemonldap::NG::Portal::Lib::2fDevices - Role for registrable second factors
This role provides LemonLDAP::NG modules with a high-level interface to storing information on registrable second factors into the persistent session.
It is recommended that _2fDevices is never accessed directly from code outside of this module
Updates one field of a registered device
$self->update2fDevice($req, $info, $type, $key, $value, $update_key, $update_value);
Returns true if the update was sucessful
Register a new device
$self->add2fDevice($req, $info, $device);
Delete the devices specified in the @$devices array
$self->del2fDevices($req, $info, $devices);
[ { type => xxx, epoch => xxx }, { type => xxx, epoch => xxx } ]
Delete a single device
$self->del2fDevice($req, $info, $type, $epoch);
Find devices from one of its attributes
$self->find2fDevicesByKey($req, $info, $type, $key, $value);
Returns an array of devices for which type, key and value match the supplied ones
Return all registrable devices.
$self->get2fDevices($req, $info);
Returns an arrayref of all registrable devices, or undef if an error occured
Return all registrable devices of a certain type. If type is not given, return all registrable devices
$self->find2fDevicesByType($req, $info, $type);
Returns an array of all matching devices
To install Lemonldap::NG::Portal, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lemonldap::NG::Portal
CPAN shell
perl -MCPAN -e shell install Lemonldap::NG::Portal
For more information on module installation, please visit the detailed CPAN module installation guide.