PHPackages                             optimus/oauth2-server-lumen - 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. optimus/oauth2-server-lumen

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

optimus/oauth2-server-lumen
===========================

A Lumen bridge for lucadegasperi/oauth2-server-laravel

0.1.2(11y ago)557.9k16[5 issues](https://github.com/esbenp/oauth2-server-lumen/issues)[1 PRs](https://github.com/esbenp/oauth2-server-lumen/pulls)PHP

Since May 7Pushed 10y ago6 watchersCompare

[ Source](https://github.com/esbenp/oauth2-server-lumen)[ Packagist](https://packagist.org/packages/optimus/oauth2-server-lumen)[ RSS](/packages/optimus-oauth2-server-lumen/feed)WikiDiscussions master Synced 1mo ago

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

oauth2-server-lumen
===================

[](#oauth2-server-lumen)

A Lumen bridge for lucadegasperi/oauth2-server-laravel.

Guide
-----

[](#guide)

I have written an extensive blog post on it's use here.

[Building a web app with Lumen web API and OAuth2 authentication](http://esbenp.github.io/2015/05/26/lumen-web-api-oauth-2-authentication/)

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

[](#installation)

### Via composer

[](#via-composer)

Run `composer require optimus/oauth2-server-lumen 0.1.*`

### Register package

[](#register-package)

In your `bootstrap/app.php` register service providers

```
$app->register('LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider');
$app->register('Optimus\OAuth2Server\OAuth2ServerServiceProvider');

```

... and middleware

```
$app->middleware([
    'LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware'
]);

```

... and route middleware

```
$app->routeMiddleware([
    'check-authorization-params' => 'Optimus\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware',
    'csrf' => 'Laravel\Lumen\Http\Middleware\VerifyCsrfToken',
    'oauth' => 'Optimus\OAuth2Server\Middleware\OAuthMiddleware',
    'oauth-owner' => 'Optimus\OAuth2Server\Middleware\OAuthOwnerMiddleware'
]);

```

### Copy config

[](#copy-config)

Copy `vendor/lucadegasperi/oauth2-server-laravel/config/oauth2.php` to your own config folder (`config/oauth2.php` in your project root). It has to be the correct config folder as it is registered using `$app->configure()`.

### Migrate

[](#migrate)

Run `php artisan migrate --path=vendor/lucadegasperi/oauth2-server-laravel/migrations`

If you get an error saying the Config class can not be found, add `class_alias('Illuminate\Support\Facades\Config', 'Config');` to your `bootstrap/app.php` file and uncomment `$app->withFacades();` temporarily to import the migrations.

Usage
-----

[](#usage)

The package is now installed for Lumen. Usage is the same as with lucadegasperi/oauth2-server-laravel, so I suggest you read the [wiki](https://github.com/lucadegasperi/oauth2-server-laravel/wiki) for usage.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

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

Every ~0 days

Total

2

Last Release

4030d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d88b809e85efd08ac8802d9d20f5e4c80560ad9b72476efd179ec00188f9bd27?d=identicon)[esbenp](/maintainers/esbenp)

---

Top Contributors

[![esbenp](https://avatars.githubusercontent.com/u/934819?v=4)](https://github.com/esbenp "esbenp (16 commits)")[![sorora](https://avatars.githubusercontent.com/u/4539638?v=4)](https://github.com/sorora "sorora (3 commits)")[![olavocneto](https://avatars.githubusercontent.com/u/568745?v=4)](https://github.com/olavocneto "olavocneto (1 commits)")

### Embed Badge

![Health badge](/badges/optimus-oauth2-server-lumen/health.svg)

```
[![Health](https://phpackages.com/badges/optimus-oauth2-server-lumen/health.svg)](https://phpackages.com/packages/optimus-oauth2-server-lumen)
```

###  Alternatives

[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[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)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)[socialiteproviders/google

Google OAuth2 Provider for Laravel Socialite

176.8M22](/packages/socialiteproviders-google)

PHPackages © 2026

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