PHPackages                             santanu/lumen-mysql-oauth - 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. santanu/lumen-mysql-oauth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

santanu/lumen-mysql-oauth
=========================

OAuth API Authorization based on Lumen Framework and MySQL

081[1 PRs](https://github.com/santanu-brahma/lumen-mysql-oauth/pulls)PHP

Since Sep 18Pushed 8y ago2 watchersCompare

[ Source](https://github.com/santanu-brahma/lumen-mysql-oauth)[ Packagist](https://packagist.org/packages/santanu/lumen-mysql-oauth)[ RSS](/packages/santanu-lumen-mysql-oauth/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OAuth Library for Lumen &amp; MySQL
===================================

[](#oauth-library-for-lumen--mysql)

Package for creating oauthable authorization based on Lumen Framework and MySQL.

Package Installations
---------------------

[](#package-installations)

- Add "santanu/lumen-mysql-oauth": "\*" in your lumen project, then run composer update.
- Copy all migration files from database/migrations to project's db migration directory.
- Run php artisan migrate from project's root directory.
- Add 'client\_id' and 'client\_secret' value in the clients collection.
- Need to copy config files from src/config to project's config directory.
- Now change User model name and path in oauth.php config file.

Configure Application
---------------------

[](#configure-application)

- Model User should be implement Santanu\\Lumen\_Oauth\\Interfaces\\Oauthable
- Add trait for model User Santanu\\Lumen\_Oauth\\Traits\\Oauthable
- Add service provider Santanu\\Lumen\_Oauth\\Providers\\ServiceProvider
- In routes/web.php add following lines for Oauth service,

```
$app->group(['prefix' => 'oauth'], function() use ($app)
{
    $app->post('access', function() use($app) {
		return $app->make('oauth.routes')->accessToken();
    });
	$app->post('refresh', function() use($app) {
		return $app->make('oauth.routes')->refreshToken();
    });
});
```

- In routes add 'oauth' as a middleware in service routes.

Authorization Service
---------------------

[](#authorization-service)

- POST application-url/oauth/access Params: grant\_type(password), client\_id, client\_secret, username, password Response: access\_token, expires\_in, token\_type, scope, refresh\_token
- POST application-url/oauth/refresh Params: grant\_type(refresh\_token), client\_id, client\_secret, refresh-token Response: access\_token, expires\_in, token\_type, scope, refresh\_token
- Send header in all API requests: Authorization: Bearer access\_token

Important Information
---------------------

[](#important-information)

- This library is based on Lumen and MySQL if you are looking for Lumen and MongoDB package then use it *From: *

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

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

---

Top Contributors

[![santanu-brahma](https://avatars.githubusercontent.com/u/3183444?v=4)](https://github.com/santanu-brahma "santanu-brahma (1 commits)")

### Embed Badge

![Health badge](/badges/santanu-lumen-mysql-oauth/health.svg)

```
[![Health](https://phpackages.com/badges/santanu-lumen-mysql-oauth/health.svg)](https://phpackages.com/packages/santanu-lumen-mysql-oauth)
```

###  Alternatives

[kartik-v/yii2-password

Useful password strength validation utilities for Yii Framework 2.0

761.2M17](/packages/kartik-v-yii2-password)

PHPackages © 2026

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