Scroll to navigation

Lemonldap::NG::Portal::Lib::2fDevices(3pm) User Contributed Perl Documentation Lemonldap::NG::Portal::Lib::2fDevices(3pm)

NAME

Lemonldap::NG::Portal::Lib::2fDevices - Role for registrable second factors

DESCRIPTION

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

METHODS

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);
    

Returns true if the update was sucessful

Delete the devices specified in the @$devices array

    $self->del2fDevices($req, $info, $devices);
    

Returns true if the update was sucessful

Delete a single device

    $self->del2fDevice($req, $info, $type, $epoch);
    

Returns true if the update was sucessful

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

2023-05-13 perl v5.32.1