PHPackages                             wearesho-team/yii2-tokens - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wearesho-team/yii2-tokens

ActiveLibrary[Database &amp; ORM](/categories/database)

wearesho-team/yii2-tokens
=========================

Storing tokens (authorization, registration) in redis database.

1.3.4(1y ago)0112[1 PRs](https://github.com/wearesho-team/yii2-tokens/pulls)1MITPHPPHP ^8.1

Since Jan 19Pushed 1y ago2 watchersCompare

[ Source](https://github.com/wearesho-team/yii2-tokens)[ Packagist](https://packagist.org/packages/wearesho-team/yii2-tokens)[ RSS](/packages/wearesho-team-yii2-tokens/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (7)Versions (12)Used By (1)

Yii2 Tokens
===========

[](#yii2-tokens)

[![PHP Composer](https://github.com/wearesho-team/yii2-tokens/actions/workflows/php.yml/badge.svg?branch=master)](https://github.com/wearesho-team/yii2-tokens/actions/workflows/php.yml)[![Latest Stable Version](https://camo.githubusercontent.com/3ab959caacd53b742f090391e05617e96a369de5313476de05eca9f07ca8d422/68747470733a2f2f706f7365722e707567782e6f72672f776561726573686f2d7465616d2f796969322d746f6b656e732f762f737461626c652e706e67)](https://packagist.org/packages/wearesho-team/yii2-tokens)[![Total Downloads](https://camo.githubusercontent.com/0d9f50662c17bdec4a51d35b4ad21fe845a3c5dd9e0195e0cb8f4a6ab39143a5/68747470733a2f2f706f7365722e707567782e6f72672f776561726573686f2d7465616d2f796969322d746f6b656e732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wearesho-team/yii2-tokens)[![codecov](https://camo.githubusercontent.com/f905359ed90f41c367d7e1bb7fdb33124778b474ca4423537a6541315aa34808/68747470733a2f2f636f6465636f762e696f2f67682f776561726573686f2d7465616d2f796969322d746f6b656e732f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/wearesho-team/yii2-tokens)

Storing tokens (authorization, registration) in redis database.

Installation
------------

[](#installation)

```
composer require wearesho-team/yii2-tokens:^1.1.1
```

Usage
-----

[](#usage)

### Repository

[](#repository)

To store tokens you should use [Repository](./src/Repository.php) that will receive [token entity](./src/EntityInterface.php) and generate UUIDv4 hash. Then, you can receive token using generated hash.

```
