Net::D...:Group(3pm)
π NAME π
Okay so bestie, you're looking at Net::Duo::Admin::Group β it's a whole Perl object that is a Duo group. Like, a group from Duo, but in Perl form. This page is the manual page Net::D...:Group(3pm), and yes it ate π
. Iconic.
πΈ SYNOPSIS πΈ
The vibe in code form:
my $decoded_json = get_json();
my $group = Net::Duo::Admin::Group->new($decoded_json);
say $group->desc;
That's it. That's the whole main character moment. β¨
π REQUIREMENTS π
You need Perl 5.14 or later, plus these modules, all of which live on CPAN:
HTTP::RequestandHTTP::Response(they're part ofHTTP::Message)JSONLWP(also known aslibwww-perl)Perl6::SlurpSub::InstallURI::Escape(part ofURI)
π¦ DESCRIPTION π¦
A Net::Duo::Admin::Group object is a Perl representation of a Duo group, exactly as the Duo Admin API hands it back. Usually you get one from the groups() method, or it's just chilling nested inside a user that came out of the users() method. It's carrying all sorts of info about the group, including the privileges that group controls. π
π CLASS METHODS π
create(DUO, DATA)
Makes a brand-new group over in Duo and hands you the resulting user as a fresh Net::Duo::Admin::Group object.
DUOβ theNet::Duoobject that should be used to perform the creation.DATAβ a reference to a hash. Here's what can go in it:nameβ the name of the group to create. Required. Fr fr, you need this one.descβ the description of the group. Optional.push_enabledβ whether users in the group will be able to use Duo Push to authenticate. Peep thepush_enabled()method below for more. Optional.sms_enabledβ whether users in the group will be able to use SMS to authenticate. Peep thesms_enabled()method below for more. Optional.statusβ the group's authentication status. Peep thestatus()method below for the possible values. Optional.voice_enabledβ whether users in the group will be able to use voice callbacks to authenticate. Peep thevoice_enabled()method below for more. Optional.
new(DUO, DATA)
Builds a new Net::Duo::Admin::Group object out of a full data set.
DUOβ theNet::Duoobject that should be used for any further actions on this object.DATAβ the data structure the Duo REST API returned for a single user, after JSON decoding.
π₯ INSTANCE ACTION METHODS π₯
delete()
Yeets this group from Duo. ποΈ Once this call succeeds, treat the Net::Duo::Admin::Group object as read-only, because there's no meaningful way to send any further changes to Duo. It's done, bestie. It's in its read-only era.
json()
Converts the data stored in the object into JSON and returns the results. The JSON you get back should match the JSON you'd get from the Duo web service when retrieving that same object (plus any changes you made locally with the set_*() methods). This is mostly for debugging dumps, or for passing Duo objects along to other systems through more JSON APIs. Very giving "here's the receipts in JSON form". π
π INSTANCE DATA METHODS π
desc()
The description of the group.
group_id()
The unique ID of this group, as generated by Duo when the group was created.
name()
The name of this group.
push_enabled()
If true, users in the group will be able to use Duo Push to authenticate. If false, they won't be able to use Duo Push to authenticate. Lowkey important: this setting has no effect if Duo Push is disabled globally. π
sms_enabled()
If true, users in the group will be able to use SMS passcodes to authenticate. If false, they won't be able to use SMS passcodes to authenticate. Also: this setting has no effect if SMS passcodes are disabled globally. π
status()
One of these three values, no others, periodt:
"active"β the users in this group must complete secondary authentication."bypass"β the users in this group will bypass secondary authentication after completing primary authentication."disabled"β the users in this group will not be able to authenticate. π
voice_enabled()
If true, users in the group will be able to authenticate with a voice callback. If false, they won't be able to authenticate with a voice callback. And yup: this setting has no effect if voice callback is disabled globally. π
π«Ά AUTHOR π«Ά
Russ Allbery <rra@cpan.org>
π COPYRIGHT AND LICENSE π
Okay so here comes the legal bit, and we're keeping it word-for-word because that's how licenses work, bestie:
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.
β SEE ALSO β
Net::Duo::Admin- Duo Admin API for groups <https://www.duo.com/docs/adminapi#groups>
- This module is part of the
Net::Duodistribution. The current version ofNet::Duois available from CPAN, or directly from its web site at <https://www.eyrie.org/~eagle/software/net-duo/>.
That's the whole page, bestie β written against perl v5.36.0, dated 2022-12-18, and it's the manual page Net::D...:Group(3pm). Go make some groups. Slay. πβ¨π
π¦ where this page comes from
- debian bookworm: libnet-duo-perl 1.02-3 Β· MIT
- debian trixie: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu noble: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu resolute: libnet-duo-perl 1.02-3 Β· MIT
- ubuntu stonking: libnet-duo-perl 1.02-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms