<commit_before># yii2-jwt

JWT implementation for Yii2 Authorization process

For details see [JWT official website](https://jwt.io/introduction/).

## Installation

To install (only master is available now) run:
```
    composer require "damirka/yii2-jwt:dev-master"
```
Or add this line to *require* section of composer.json:
```
    "damirka/yii2-jwt:dev-master": "dev-master"
```

## Usage

There is only one trait - *UserTrait* - which gives you 5 methods for
authorization and JWT-management in User model

Set up:

In controller:

```PHP
<?php

// ...

use yii\filters\auth\HttpBearerAuth;

class BearerAuthController extends \yii\rest\ActiveController
{
    public function behaviors()
    {
        return array_merge(parent::behaviors(), [
            'bearerAuth' => [
                'class' => HttpBearerAuth::className()
            ]
        ]);
    }
}
```<commit_msg>Added stable version to README.md<commit_after># yii2-jwt

JWT implementation for Yii2 Authorization process

For details see [JWT official website](https://jwt.io/introduction/).

## Installation

To install (only master is available now) run:
```
    composer require "damirka/yii2-jwt:v0.1.0"
```
Or add this line to *require* section of composer.json:
```
    "damirka/yii2-jwt": "v0.1.0"
```

## Usage

There is only one trait - *UserTrait* - which gives you 5 methods for
authorization and JWT-management in User model

Set up:

In controller:

```PHP
<?php

// ...

use yii\filters\auth\HttpBearerAuth;

class BearerAuthController extends \yii\rest\ActiveController
{
    public function behaviors()
    {
        return array_merge(parent::behaviors(), [
            'bearerAuth' => [
                'class' => HttpBearerAuth::className()
            ]
        ]);
    }
}
```
{'fraction_non_alphanumeric': 0.12719050310910118, 'fraction_numerical': 0.009044657998869417, 'mean_word_length': 3.087759815242494, 'pattern_counts': {'":': 2, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4644218', 'n_tokens_mistral': 592, 'n_tokens_neox': 569, 'n_words': 156}