PHPackages                             oom/luya-module-apiauth - 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. oom/luya-module-apiauth

ActiveLuya-module[Authentication &amp; Authorization](/categories/authentication)

oom/luya-module-apiauth
=======================

1.0.0(8y ago)024MITPHP

Since Apr 23Pushed 5y ago1 watchersCompare

[ Source](https://github.com/baqianxin/luya-module-api)[ Packagist](https://packagist.org/packages/oom/luya-module-apiauth)[ RSS](/packages/oom-luya-module-apiauth/feed)WikiDiscussions master Synced 3d ago

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

Api Module
==========

[](#api-module)

[![Build Status](https://camo.githubusercontent.com/f306c8cc0635d8aafb649194579898790ba3442db18157120bd94c0577efe003/68747470733a2f2f7472617669732d63692e6f72672f62617169616e78696e2f6c7579612d6d6f64756c652d6170692e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/baqianxin/luya-module-api)

An oauth module for LUYA Api users.

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

[](#installation)

Install the module trough composer

```
composer require oom/luya-module-apiauth:dev-master
```

In order to add the modules to your project go into the modules section of your config:

```
return [
    'modules' => [
        // ...
        'api' => [
            'class' => 'oom\api\frontend\Module',
            'useAppViewPath' => true, // When enabled the views will be looked up in the @app/views folder, otherwise the views shipped with the module will be used.
        ],
        'apiadmin' => 'oom\api\admin\Module',
        // ...
    ],
];
```

Enable the user component with the built in ApiAuthUser class and add the REST Url rule:

```
    'components' => [

        //...
        'user' => [
            'identityClass' => 'oom\api\models\APIAuthUser',
            'enableAutoLogin' => true,
            'enableSession' => false,
            'loginUrl' => null,
        ],
        'urlManager' => [
            'rules' => [
                ['class' => 'yii\rest\UrlRule', 'controller' => 'api/user'],
            ],
        ],
        // ...
    ]
```

Example usage
-------------

[](#example-usage)

1. Insert the test user: `http://your.domain/api/sign/signup-test`
2. Send a post request to `http://your.domain/api/sign/token` with `app_key` and `app_secret` data in order to get the access token.

[![Step 2](./step-2.png)](./step-2.png)

3. Test Api with the created access token `http://your.domain/api/user/rules?token=ACCESS_TOKEN_FROM_TOKEN_REQUEST`

[![Step 3](./step-3.png)](./step-3.png)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2943d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6780391?v=4)[qianxin](/maintainers/baqianxin)[@baqianxin](https://github.com/baqianxin)

---

Top Contributors

[![baqianxin](https://avatars.githubusercontent.com/u/6780391?v=4)](https://github.com/baqianxin "baqianxin (16 commits)")[![nadar](https://avatars.githubusercontent.com/u/3417221?v=4)](https://github.com/nadar "nadar (2 commits)")

### Embed Badge

![Health badge](/badges/oom-luya-module-apiauth/health.svg)

```
[![Health](https://phpackages.com/badges/oom-luya-module-apiauth/health.svg)](https://phpackages.com/packages/oom-luya-module-apiauth)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
