logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Net::Duo::Auth::Async - Representation of an asynchronous Duo authentication

Author

       Russ Allbery <rra@cpan.org>

Class Methods

       new(DUO, ID)
           Create  a  new Net::Duo::Auth::Async object from a Net::Duo object and a transaction.  This should be
           used to recreate the Net::Duo::Auth::Async object if the transaction ID were handed off to some other
           process that then asks for status later.

Description

       Net::Duo::Auth::Async represents an open asynchronous authentication attempt with Duo.  It's a wrapper
       around the Duo async transaction ID and the method to check on the status of that transaction.  This
       object can either be created directly from a stored transaction ID or is returned by the auth_async()
       method of Net::Duo::Auth.

Instance Methods

id()
           Returns the transaction ID represented by this object.  This transaction ID  can  be  used  later  to
           recreate the object.

       status()
           Returns the status of the authentication.

           In  scalar  context,  returns  only  the status, which will be one of "allow", "deny", and "waiting".
           "waiting" indicates that the authentication is still in progress and has not yet completed.

           In list context, returns the same status as the first element and a reference to a hash of additional
           information as the second element.  The hash will have one or more of the following keys:

           status
               String detailing the progress or outcome of the authentication attempt.  See  the  Duo  Auth  API
               documentation for a complete list of possible values.

           status_msg
               A  string describing the result of the authentication attempt.  If the authentication attempt was
               denied, it may identify a reason.  This string is intended for display to the user.

           trusted_device_token
               If the trusted devices option is enabled for this account, returns a token for a  trusted  device
               that can later be passed to the Duo "preauth" endpoint.

Name

       Net::Duo::Auth::Async - Representation of an asynchronous Duo authentication

Requirements

       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.

See Also

       Duo Auth API <https://www.duo.com/docs/authapi>

       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/>.

perl v5.36.0                                       2022-12-18                         Net::Duo::Auth::Async(3pm)

Synopsis

           use 5.010;

           my $config = get_config();
           my $duo = Net::Duo::Auth->new($config);
           my $async = $duo->auth_async({ username => 'user', factor => 'auto' });
           say scalar($async->status);

See Also