wudege/token-assistant

Token Management based Redis

v1.0.6 2017-02-05 03:31 UTC

This package is not auto-updated.

Last update: 2024-05-12 00:12:02 UTC


README

Software License Build Status Scrutinizer Code Quality Coverage Status Latest Stable Version Total Downloads Twitter URL

INSTALL

  • Use the composer command or the composer.json file. That's the recommend way. And the SDK is here wudege/token-assistant
$ composer require wudege/token-assistant

USAGE

require __DIR__ . '/vendor/autoload.php';

$config = array(
    'host'     => '127.0.0.1',
    'port'     => 6379,
    'database' => 0,
);
$userId = 9527;

$client     = new \Predis\Client($config);
$dispatcher = new \TokenAssistant\TokenDispatcher($client);
$token      = $dispatcher->assign($userId);

TEST

$ ./vendor/bin/phpunit tests/TokenAssistant/Tests

LICENSE

The MIT License (MIT). License File.