PHPackages                             magento/magento-zf-duo\_api\_php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. magento/magento-zf-duo\_api\_php

ActiveLibrary[API Development](/categories/api)

magento/magento-zf-duo\_api\_php
================================

A PHP implementation of the Duo API.

1.0.0(5mo ago)06.4k↓89.4%2PHPPHP &gt;=8.0

Since Jan 20Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/magento/magento-zf-duo_api_php)[ Packagist](https://packagist.org/packages/magento/magento-zf-duo_api_php)[ Docs](https://duo.com/)[ RSS](/packages/magento-magento-zf-duo-api-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Overview
========

[](#overview)

[![Build Status](https://github.com/duosecurity/duo_api_php/workflows/PHP%20CI/badge.svg?branch=master)](https://github.com/duosecurity/duo_api_php/actions)

**Auth** -

**Admin** -

**Accounts** -

Tested Against PHP Versions:
----------------------------

[](#tested-against-php-versions)

- 8.0
- 8.1
- 8.2

TLS 1.2 and 1.3 Support
-----------------------

[](#tls-12-and-13-support)

Duo\_api\_php uses PHP's cURL extension and OpenSSL for TLS operations. TLS support will depend on the versions of multiple libraries:

TLS 1.2 support requires PHP 5.5 or higher, curl 7.34.0 or higher, and OpenSSL 1.0.1 or higher.

TLS 1.3 support requires PHP 7.3 or higher, curl 7.61.0 or higher, and OpenSSL 1.1.1 or higher.

Installing
==========

[](#installing)

Development:

```
$ git clone https://github.com/duosecurity/duo_api_php.git
$ cd duo_api_php
$ composer install

```

System:

```
$ composer global require duosecurity/duo_api_php:dev-master

```

Or add the following to your project:

```
{
    "require": {
        "duosecurity/duo_api_php": "dev-master"
    }
}

```

Using
=====

[](#using)

```
$ php -a -d auto_prepend_file=vendor/autoload.php
Interactive mode enabled

php > $D = new DuoAPI\Auth($ikey, $skey, $host);
php > var_dump($D->preauth($username));
array(2) {
  'response' =>
  array(2) {
    'response' =>
    array(3) {
      'enroll_portal_url' =>
      string(23) "https://api-example.com"
      'result' =>
      string(6) "enroll"
      'status_msg' =>
      string(42) "Enroll an authentication device to proceed"
    }
    'stat' =>
    string(2) "OK"
  }
  'success' =>
  bool(true)
}

```

Testing
=======

[](#testing)

```
$ ./vendor/bin/phpunit -c phpunit.xml

```

Note that the tests in `tests/SSL/SSLTest.php` require `stunnel3`.

Linting
=======

[](#linting)

```
$ ./vendor/bin/phpcs --standard=PSR2 -n src/* tests/*

```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance71

Regular maintenance activity

Popularity22

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 51.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

164d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dbcf615f9bf1c6b766e11376c5e76245da3b22bfc132da6a85c1e185f31ddd26?d=identicon)[mage2-team](/maintainers/mage2-team)

---

Top Contributors

[![AaronAtDuo](https://avatars.githubusercontent.com/u/26978047?v=4)](https://github.com/AaronAtDuo "AaronAtDuo (23 commits)")[![mbish](https://avatars.githubusercontent.com/u/1400336?v=4)](https://github.com/mbish "mbish (6 commits)")[![mschwager](https://avatars.githubusercontent.com/u/1724818?v=4)](https://github.com/mschwager "mschwager (3 commits)")[![DenitsaTH](https://avatars.githubusercontent.com/u/155546400?v=4)](https://github.com/DenitsaTH "DenitsaTH (2 commits)")[![glo71317](https://avatars.githubusercontent.com/u/85922880?v=4)](https://github.com/glo71317 "glo71317 (1 commits)")[![jeffreyparker](https://avatars.githubusercontent.com/u/593286?v=4)](https://github.com/jeffreyparker "jeffreyparker (1 commits)")[![maxnz](https://avatars.githubusercontent.com/u/16338288?v=4)](https://github.com/maxnz "maxnz (1 commits)")[![nstojcevich](https://avatars.githubusercontent.com/u/13511571?v=4)](https://github.com/nstojcevich "nstojcevich (1 commits)")[![sandesh-as](https://avatars.githubusercontent.com/u/203625718?v=4)](https://github.com/sandesh-as "sandesh-as (1 commits)")[![xdesai](https://avatars.githubusercontent.com/u/19935687?v=4)](https://github.com/xdesai "xdesai (1 commits)")[![yizshi](https://avatars.githubusercontent.com/u/61877973?v=4)](https://github.com/yizshi "yizshi (1 commits)")[![zmilan](https://avatars.githubusercontent.com/u/302135?v=4)](https://github.com/zmilan "zmilan (1 commits)")[![ckeif-duo](https://avatars.githubusercontent.com/u/175957886?v=4)](https://github.com/ckeif-duo "ckeif-duo (1 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![ericnorris](https://avatars.githubusercontent.com/u/1906605?v=4)](https://github.com/ericnorris "ericnorris (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/magento-magento-zf-duo-api-php/health.svg)

```
[![Health](https://phpackages.com/badges/magento-magento-zf-duo-api-php/health.svg)](https://phpackages.com/packages/magento-magento-zf-duo-api-php)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k15](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
