PHPackages                             the-real-start/yii2-oauth2-server-tools - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. the-real-start/yii2-oauth2-server-tools

ActiveYii2-extension[Authentication &amp; Authorization](/categories/authentication)

the-real-start/yii2-oauth2-server-tools
=======================================

Set of simple tools for

v0.1.1(9y ago)014MITPHP

Since Aug 24Pushed 9y ago1 watchersCompare

[ Source](https://github.com/TheRealStart/yii2-oauth2-server-tools)[ Packagist](https://packagist.org/packages/the-real-start/yii2-oauth2-server-tools)[ Docs](https://github.com/TheRealStart/yii2-oauth2-server-tools)[ RSS](/packages/the-real-start-yii2-oauth2-server-tools/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

yii2-oauth2-server-tools
========================

[](#yii2-oauth2-server-tools)

Set of simple tools that helps to build API based on `alegz/yii2-oauth2-server` package.

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

[](#installation)

Via command line:

`composer require the-real-start/yii2-oauth2-server-tools`

Or add lime to composer.json requirement section:

```
"require": {
    ...
    "the-real-start/yii2-oauth2-server-tools": "*"
    ...
  }

```

Usage
-----

[](#usage)

Package namepsace: `TRS\yii2\oauth2server\tools`

Package provides 5 classes for setting up oauth2-server:

- Abstract class AppIdentity
- Abstract class User
- Class ErrorHandler
- Class AccessRules
- Class JsonHttpException

### AppIdentity

[](#appidentity)

Abstract class for `client credentials` grant\_type (see  for details).

You should declare getIsPublic method for you version of `AppIdentity`class. See example below:

```
