2017 © Pedro Peláez
 

library duo_php

A PHP implementation of the Duo Web SDK. With PHP 5.5 support

image

smate/duo_php

A PHP implementation of the Duo Web SDK. With PHP 5.5 support

  • Monday, April 10, 2017
  • by smate
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1,259 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 26 Forks
  • 0 Open issues
  • 2 Versions
  • 28 % Grown

The README.md

Overview

duo_php - Duo two-factor authentication for PHP web applications: https://duo.com/docs/duoweb, (*1)

This package allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any web login form - without setting up secondary user accounts, directory synchronization, servers, or hardware., (*2)

Files located in the js directory should be hosted by your webserver for inclusion in web pages., (*3)

Deprecation

The duo_web.php file has been deprecated in favor of a PSR-4 (http://www.php-fig.org/psr/psr-4/) style package., (*4)

To update your code please make the following changes: * Install globally via composer as seen below * Change instances of Duo::signRequest to Duo\Web::signRequest * Change instances of Duo::verifyResponse to Duo\Web::verifyResponse, (*5)

Installing

Development:, (*6)

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

System:, (*7)

$ composer global require duosecurity/duo_php:dev-master

Or add the following to your project:, (*8)

{
    "require": {
        "duosecurity/duo_php": "dev-master"
    }
}

Using

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

php > var_dump(Duo\Web::signRequest($ikey, $skey, $akey, $username));
string(202) "TX|...TX_SIGNATURE...==|...TX_HASH...:APP|...APP_SIGNATURE...==|...APP_HASH..."

Demo

First add an IKEY, SKEY, and HOST to demos/simple/index.php, then run the following:, (*9)

$ php -S localhost:8080 -t demos/simple/

Test

$ ./vendor/bin/phpunit -c phpunit.xml
PHPUnit 5.3.2 by Sebastian Bergmann and contributors.

.............                                                     13 / 13 (100%)

Time: 62 ms, Memory: 6.00Mb

OK (13 tests, 13 assertions)

Lint

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

Support

Report any bugs, feature requests, etc. to us directly: support@duosecurity.com, (*10)

The Versions

10/04 2017

dev-master

9999999-dev https://duo.com/

A PHP implementation of the Duo Web SDK. With PHP 5.5 support

  Sources   Download

The Requires

  • php >=5.5

 

The Development Requires

10/04 2017

v1.0

1.0.0.0 https://duo.com/

A PHP implementation of the Duo Web SDK. With PHP 5.5 support

  Sources   Download

The Requires

  • php >=5.5

 

The Development Requires