Net::Duo::Admin::Group - Representation of a Duo group
my $decoded_json = get_json();
my $group = Net::Duo::Admin::Group->new($decoded_json);
Perl 5.14 or later and the modules HTTP::Request and HTTP::Response (part of HTTP::Message), JSON, LWP (also known as libwww-perl), Perl6::Slurp, Sub::Install, and URI::Escape (part of URI), all of which are available from CPAN.
A Net::Duo::Admin::Group object is a Perl representation of a Duo group as returned by the Duo Admin API, usually via the groups() method or nested in a user returned by the users() method. It contains various information about a group, including the privileges it controls.
Creates a new group in Duo and returns the resulting user as a new Net::Duo::Admin::Group object. DUO is the Net::Duo object that should be used to perform the creation. DATA is a reference to a hash with the following keys:
The name of the group to create. Required.
The description of the group. Optional.
Whether users in the group will be able to use Duo Push to authenticate. See the "push_enabled()" method below for more information. Optional.
Whether users in the group will be able to use SMS to authenticate. See the "sms_enabled()" method below for more information. Optional.
The group's authentication status. See the "status()" method below for the possible values. Optional.
Whether users in the group will be able to use voice callbacks to authenticate. See the "voice_enabled()" method below for more information. Optional.
Creates a new Net::Duo::Admin::Group object from a full data set. DUO is the Net::Duo object that should be used for any further actions on this object. DATA should be the data structure returned by the Duo REST API for a single user, after JSON decoding.
Delete this group from Duo. After successful completion of this call, the Net::Duo::Admin::Group object should be considered read-only, since no further changes to the object can be meaningfully sent to Duo.
Convert the data stored in the object to JSON and return the results. The resulting JSON should match the JSON that one would get back from the Duo web service when retrieving the same object (plus any changes made locally to the object via set_*() methods). This is primarily intended for debugging dumps or for passing Duo objects to other systems via further JSON APIs.
The description of the group.
The unique ID of this group as generated by Duo on group creation.
The name of this group.
If true, users in the group will be able to use Duo Push to authenticate. If false, users in the group will not be able to use Duo Push to authenticate. Note that this setting has no effect if Duo Push is disabled globally.
If true, users in the group will be able to use SMS passcodes to authenticate. If false, users in the group will not be able to use SMS passcodes to authenticate. Note that this setting has no effect if SMS passcodes are disabled globally.
One of the following values:
The users in this group must complete secondary authentication.
The users in this group will bypass secondary authentication after completing primary authentication.
The users in this group will not be able to authenticate.
If true, users in the group will be able to authenticate with a voice callback. If false, users in the group will not be able to authenticate with a voice callback. Note that this setting has no effect if voice callback is disabled globally.
Russ Allbery <email@example.com>
Copyright 2014 The Board of Trustees of the Leland Stanford Junior University
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Duo Admin API for groups
This module is part of the Net::Duo distribution. The current version of Net::Duo is available from CPAN, or directly from its web site at https://www.eyrie.org/~eagle/software/net-duo/.
To install Net::Duo, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.