2017 © Pedro Peláez
 

library yii2-yubikey

Component wrapper for the enygma/yubikey library

image

websightnl/yii2-yubikey

Component wrapper for the enygma/yubikey library

  • Wednesday, August 24, 2016
  • by eborned
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 50 % Grown

The README.md

Yubikey Component for Yii2

Setup

Get your API key and client ID from https://upgrade.yubico.com/getapikey/., (*1)

// app/config/main.php
return [
    ...
    'components' => [
        ...
        'yubikey' => [
            'class' => 'websightnl\yii2yubikey\Yubikey',
            'apiKey' => '',
            'clientId' => '',
        ]
        ...
    ]
    ...
];

Basic Usage

$status = Yii::$app->yubikey->validate('tokenfromuser');

Settings

The component supports most of the parameters of the original library. For more information, please see https://github.com/enygma/yubikey., (*2)

// app/config/main.php
return [
    ...
    'components' => [
        ...
        'yubikey' => [
            'class' => 'websightnl\yii2yubikey\Yubikey',
            'apiKey' => '',
            'clientId' => '',
            // Enable HTTPS for the connection (defaults to true)
            'secure' => true,
            // Custom list of validation hosts
            'hosts' => ['validate1.example.org', 'validate2.example.org'],
            // Additonally, the library also supports simultaneous connections to multiple servers.
            'multiServer' => false
            // Additionally, you can also switch on and off this aggregation of the results and go with only the "first in" response
            'firstIn' => true
        ]
        ...
    ]
    ...
];

The Versions

24/08 2016

dev-master

9999999-dev

Component wrapper for the enygma/yubikey library

  Sources   Download

MIT

The Requires