2017 © Pedro Peláez
 

yii-extension tokenmanager

Token manager for the Yii framework

image

yiicod/tokenmanager

Token manager for the Yii framework

  • Thursday, January 19, 2017
  • by lexxorlov
  • Repository
  • 0 Watchers
  • 0 Stars
  • 27 Installations
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 4 % Grown

The README.md

Token MongoDB/MySQL generator

With this extension you easy generate token on one application and use this token on other application. Tokens are saved on the MongDB/MySQL., (*1)

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist yiicod/tokenmanager "*"

or add, (*4)

"yiicod/tokenmanager": "*"

Config ( This is all config for extensions ):

'components' => [
    ...
    'tokenManager' => [
        'class' => 'yiicod\tokenmanager\MongoDbPhp7TokenManager',
        'connectionString' => 'mongodb://IP:PORT',
        'privateKey' => 'Required',
        'dbName' => 'DB name',
        'collectionName' => 'Collection name',
    ]
]

Generate token:

Yii::app()->tokenManager->generate(array('id' => $model->id))

Load token:

$token = Yii::app()->tokenManager->load($token);

Validate token:

Yii::app()->tokenManager->validate($token);

The Versions

19/01 2017

dev-master

9999999-dev

Token manager for the Yii framework

  Sources   Download

New BSD License

19/01 2017

0.1.0

0.1.0.0

Token manager for the Yii framework

  Sources   Download

New BSD License