Net::Duo

Warning

This package is orphaned. You should use the Perl code provided by Duo instead, since it will be more up-to-date with current features. I no longer maintain a large Duo deployment, and my current company uses Python instead. That said, I do still think this package provides a nicer object framework for the Duo API in Perl; if you agree, please feel free to adopt it and maintain it!

Blurb

Net::Duo provides an object-oriented Perl interface for the Duo Security REST APIs. It attempts to abstract some of the API details and provide an object-oriented view of the returned objects in order to make use of the API in Perl code more natural than dealing with JSON data structures directly. Currently, some parts of the Auth and Admin APIs are implemented alongside with generic methods to call any of the JSON-based APIs.

Description

Duo Security is a cloud second-factor authentication service that supports a wide variety of different mechanisms for a user to establish a second authentication factor. It is intended to supplement local authentication systems, such as password-based authentication, with an unrelated second factor: possession of a device, or access to a phone. Duo Security provides direct integration with a variety of applications and a self-service web sign-up interface, but for more control, it also provides several RESTful APIs that can perform all possible actions on Duo accounts, users, and their devices.

This module implements a client for the Duo REST APIs. It differs from the sample Perl implementation provided by Duo in that it attempts to wrap the Duo data model and JSON information in Perl objects and provide logical and convenient methods on those objects to make writing Perl clients of Duo simpler and easier. It tries to abstract portions of the API, such as the endpoint URLs, that allow for more natural and less cluttered Perl code than manipulating the JSON data structures directly.

The API implementation is currently incomplete and contains just the calls required by Stanford's integration. Only the Auth and Admin APIs are implemented, and both are partial. However, the Net::Duo call, call_json, and call_json_paged methods can be used to make calls to APIs that aren't fully implemented.

Requirements

Perl 5.14 or later and Module::Build 0.28 or later are required to build this module. The following additional Perl modules are required to use it:

All are available on CPAN.

Download

The distribution:

Net::Duo 1.02 2019-03-07 tar.gz (PGP signature) tar.xz (PGP signature)

An archive of older releases is also available.

A Debian package (as libnet-duo-perl) is included in Debian 8.0 (jessie) and later releases. See the Debian package tracker for more information.

Net::Duo is available from CPAN as the Net-Duo distribution.

Net::Duo is maintained using the Git version control system. To check out the current development tree, see GitHub or clone:

    https://git.eyrie.org/git/perl/net-duo.git

Pull requests on GitHub are welcome. You can also browse the current development source.

Documentation

User documentation:

Developer documentation:

API documentation:

License

The Net::Duo package as a whole is covered by the following copyright and license:

Copyright 2015, 2018-2019 Russ Allbery <rra@cpan.org>

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.

Some individual source files are covered by other, compatible licenses. For complete copyright and license information, see the file LICENSE in the Net::Duo source distribution.

Last spun 2022-02-06 from thread modified 2019-03-07