1Lemonldap::NG::Portal::ULsiebr::C2ofnDterviibcuetse(d3L)PeemrolnlDdoacpu:m:eNnGt:a:tPioorntal::Lib::2fDevices(3)
2
3
4

NAME

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

DESCRIPTION

10       This role provides LemonLDAP::NG modules with a high-level interface to
11       storing information on registrable second factors into the persistent
12       session.
13
14       It is recommended that _2fDevices is never accessed directly from code
15       outside of this module
16

METHODS

18       update2fDevice
19           Updates one field of a registered device
20
21               $self->update2fDevice($req, $info, $type, $key, $value, $update_key, $update_value);
22
23           req: Current LemonLDAP::NG request
24           info: hashref of current session information
25           type: 'type' field of the device to update
26           key, value: update the device whose 'key' field equals value
27           update_key, update_value: set the matched devices' 'update_key'
28           field to update_value
29
30           Returns true if the update was sucessful
31
32       add2fDevice
33           Register a new device
34
35               $self->add2fDevice($req, $info, $device);
36
37           req: Current LemonLDAP::NG request
38           info: hashref of current session information
39           device: hashref of device details. It must contain at least a
40           'type', 'name' and 'epoch' key
41
42           Returns true if the update was sucessful
43
44       del2fDevices
45           Delete the devices specified in the @$devices array
46
47               $self->del2fDevices($req, $info, $devices);
48
49           req: Current LemonLDAP::NG request
50           info: hashref of current session information
51           device: arrayref of type+epoch hashrefs
52                   [ { type => xxx, epoch => xxx }, { type => xxx, epoch => xxx } ]
53
54           Returns true if the update was sucessful
55
56       del2fDevice
57           Delete a single device
58
59               $self->del2fDevice($req, $info, $type, $epoch);
60
61           req: Current LemonLDAP::NG request
62           info: hashref of current session information
63           type: type of the device to remove
64           epoch: timestamp of the device to remove
65
66           Returns true if the update was sucessful
67
68       find2fDevicesByKey
69           Find devices from one of its attributes
70
71               $self->find2fDevicesByKey($req, $info, $type, $key, $value);
72
73           req: Current LemonLDAP::NG request
74           info: hashref of current session information
75           type: device type
76           key, value: attribute to search in the device hash and the value to
77           filter on
78
79           Returns an array of devices for which type, key and value match the
80           supplied ones
81
82       get2fDevices
83           Return all registrable devices.
84
85               $self->get2fDevices($req, $info);
86
87           req: Current LemonLDAP::NG request
88           info: hashref of current session information
89
90           Returns an arrayref of all registrable devices, or undef if an
91           error occured
92
93       find2fDevicesByType
94           Return all registrable devices of a certain type. If type is not
95           given, return all registrable devices
96
97               $self->find2fDevicesByType($req, $info, $type);
98
99           req: Current LemonLDAP::NG request
100           info: hashref of current session information
101           type: type of registrable device to return
102
103           Returns an array of all matching devices
104
105
106
107perl v5.36.1                      2023-L1e1m-o1n4ldap::NG::Portal::Lib::2fDevices(3)
Impressum