2017 © Pedro Peláez
 

yii2-extension yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

image

sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  • Friday, June 16, 2017
  • by sergeymakinen
  • Repository
  • 2 Watchers
  • 12 Stars
  • 138 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 8 Versions
  • 14 % Grown

The README.md

JWT powered User for Yii 2

JWT (JSON Web Token) based Yii 2 User component drop-in replacement., (*1)

Code Quality Build Status Code Coverage SensioLabsInsight, (*2)

Packagist Version Total Downloads Software License, (*3)

Installation

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

Either run, (*5)

composer require "sergeymakinen/yii2-jwt-user:^3.0"

or add, (*6)

"sergeymakinen/yii2-jwt-user": "^3.0"

to the require section of your composer.json file., (*7)

Usage

Set the following Yii 2 configuration parameters:, (*8)

[
    'components' => [
        'user' => [
            'class' => 'sergeymakinen\yii\jwtuser\User',
            'identityClass' => 'app\models\User',
            'enableAutoLogin' => true, // Optional
            'key' => 'random sign key (CHANGE IT!)',
        ],
    ],
]

Also set identityClass to whatever your identity class name is., (*9)

Don't forget: set key to some random value and make sure it's secret and long enough., (*10)

Configuration

You can choose between 3 different modes of sign key generation:, (*11)

$useAuthKey value $appendAuthKey value Resulting key
false false sergeymakinen\yii\jwtuser\User::$key
true false yii\web\IdentityInterface::getAuthKey()
true true sergeymakinen\yii\jwtuser\User::$key
concatenated with
yii\web\IdentityInterface::getAuthKey()

Your choice depends on how you're going to use identities, revoke old/compromised keys., (*12)

It's also possible to specify "audience" and "issuer" claims (and validate against them) via corresponding $audience and $issuer properties. They both may be either strings or Closure returning a string., (*13)

The Versions

16/06 2017

dev-master

9999999-dev https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

The Development Requires

user json jwt yii2 yii token web json web token yii2-jwt-user

03/05 2017

v3.0.0

3.0.0.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

The Development Requires

user json jwt yii2 yii token web json web token yii2-jwt-user

06/01 2017

v2.0.0

2.0.0.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

The Development Requires

user json jwt yii2 yii token web json web token yii2-jwt-user

28/11 2016

v1.1.1

1.1.1.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

The Development Requires

user json jwt yii2 yii token web json web token yii2-jwt-user

24/11 2016

v1.1.0

1.1.0.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

user json jwt yii2 yii token web json web token yii2-jwt-user

23/11 2016

v1.0.3

1.0.3.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

user json jwt yii2 yii token web json web token yii2-jwt-user

23/08 2016

v1.0.2

1.0.2.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

user json jwt yii2 yii token web json web token yii2-jwt-user

07/08 2016

v1.0.1

1.0.1.0 https://github.com/sergeymakinen/yii2-jwt-user

JWT (JSON Web Token) User component for Yii 2

  Sources   Download

MIT

The Requires

 

user json jwt yii2 yii token web json web token yii2-jwt-user