2017 © Pedro Peláez
 

library yubico

PHP Package for Yubico authentication

image

bulldog/yubico

PHP Package for Yubico authentication

  • Thursday, July 26, 2018
  • by levidurfee
  • Repository
  • 2 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yubico auth

A modern PHP library for verifying Yubico One-Time Passwords., (*1)

Installation

This library can be found on Packagist. The recommended way to install this is through composer., (*2)

composer require bulldog/yubico, (*3)

Usage

We include Guzzle by default, but you are welcome to use any other PHP HTTP client. You will need to create a new adapter for any other PHP HTTP client and have it implement the OtpAdapterInterface., (*4)

<?php
include 'vendor/autoload.php';

use Bulldog\Yubico\Yubico;
use Bulldog\Yubico\Adapters\GuzzleAdapter;

$yubico = new Yubico('1234', 'c2VjcmV0X2tleQ==', new GuzzleAdapter());

if($yubico->verify('longonetimepasswordgeneratedfromayubicokey')) {
    echo "That OTP is good!\n";
} else {
    echo "OTP is bad!\n";
    echo $yubico->getReason() . "\n";
}

The Versions

26/07 2018

dev-master

9999999-dev

PHP Package for Yubico authentication

  Sources   Download

MIT

The Requires

 

26/07 2018

v1.0.0

1.0.0.0

PHP Package for Yubico authentication

  Sources   Download

MIT

The Requires