PHPackages                             stormpath/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. stormpath/lumen

AbandonedArchivedLaravel-package[Authentication &amp; Authorization](/categories/authentication)

stormpath/lumen
===============

Build simple, secure web applications with Stormpath and Laravel!

0.1.8(9y ago)82421[2 issues](https://github.com/stormpath/stormpath-lumen/issues)[3 PRs](https://github.com/stormpath/stormpath-lumen/pulls)Apache-2.0PHPPHP &gt;=5.5

Since Apr 16Pushed 9y ago16 watchersCompare

[ Source](https://github.com/stormpath/stormpath-lumen)[ Packagist](https://packagist.org/packages/stormpath/lumen)[ RSS](/packages/stormpath-lumen/feed)WikiDiscussions develop Synced 2mo ago

READMEChangelog (9)Dependencies (11)Versions (20)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/0471ae1c9520fee3628a95082917a7da5eeff30b2865a0eac427c83de2841822/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c756d656e2f762f737461626c652e737667)](https://packagist.org/packages/stormpath/lumen)[![Latest Unstable Version](https://camo.githubusercontent.com/6393020918168f2c7157c425511f6256508d336111ecc3ecec99d201892e0723/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c756d656e2f762f756e737461626c652e737667)](https://packagist.org/packages/stormpath/lumen)[![License](https://camo.githubusercontent.com/a21346038f05f9012c74840f2f05aa9d9966eace8e3a175aac9f8935b3c42ce1/68747470733a2f2f706f7365722e707567782e6f72672f73746f726d706174682f6c756d656e2f6c6963656e73652e737667)](https://packagist.org/packages/stormpath/lumen)[![Chat](https://camo.githubusercontent.com/1e78a47a2d8860198a411996253269e5e3c799e99b1c97406266c62095b84e44/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636861742d6f6e253230667265656e6f64652532302d677265656e2e737667)](http://webchat.freenode.net/?channels=#stormpath)[![Chat](https://camo.githubusercontent.com/615f20fa4c6948e2360b824d5ac5a9976e718ff2d88f2cc830cb57bb853830ee/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737570706f72742d737570706f72744073746f726d706174682e636f6d2d626c75652e737667)](mailto:support@stormpath.com?subject=Stormpath+Lumen+Integration)

Getting Started
---------------

[](#getting-started)

Follow these steps to add Stormpath user authentication to your Lumen app.

1. **Download Your Key File**

[Download your key file](https://support.stormpath.com/hc/en-us/articles/203697276-Where-do-I-find-my-API-key-) from the Stormpath Console.

2. **Store Your Key As Environment Variables**

Open your key file and grab the **API Key ID** and **API Key Secret**, then add this to your `.env` file in the root of your project:

> You may need to create a `.env` file if this is a fresh install of lumen.

```
STORMPATH_CLIENT_APIKEY_ID=
STORMPATH_CLIENT_APIKEY_SECRET=
```

3. **Get Your Stormpath Application HREF**

Login to the [Stormpath Console](https://api.stormpath.com/) and grab the *HREF* (called **REST URL** in the UI) of your *Application*. It should look something like this:

`https://api.stormpath.com/v1/applications/q42unYAj6PDLxth9xKXdL`

4. **Store Your Stormpath App HREF In the `.env` file**

```
STORMPATH_APPLICATION_HREF=
```

5. **Install The Package**

Open your composer.json file and add the following to your require block:

```
"stormpath/lumen": "^0.1"
```

6. **Include It In Your App**

    Open you `bootstrap/app.php` file and add the following to your providers section

```
$app->register(\Stormpath\Lumen\Support\StormpathServiceProvider::class);
```

7. **Configure It**

To modify the configuration of the package, you will need to publish the config file. Run the following in your terminal:

```
$ php artisan stormpath:config
```

This will create a `stormpath.yaml` file in the root of your project with all the options you are able to modify. By default, Login, Logout, OAuth, and Register routes will be enabled. Other routes will be enabled based on your directory settings.

8. **Login**

Working with an API, we suggest that you work with OAuth tokens. We have created a route for your, `/oauth/tokens` where you can do `client_credentials`, `password`, or `refresh` grant types.

- **Client Credentials**

In this workflow, an api key and secret is provisioned for a stormpath account. These credentials can be exchanged for an access token by making a POST request to `/oauth/token` on the web application. The request must look like this:

```
POST /oauth/token
Authorization: Basic

grant_type=client_credentials

```

- **Password Grant**

In this workflow, an account can post their login (username or email) and password to the ``/oauth/token` endpoint, with the following body data:

```
POST /oauth/token

grant_type=password
&username=
&password=

```

- **Refresh Grant**

The refresh grant type is required for clients using the password grant type to refresh their access\_token. Thus, it's automatically enabled alongside the password grant type.

An account can post their refresh\_token with the following body data:

```
POST /oauth/token
grant_type=refresh_token&
refresh_token=

```

The product guide for token management:

9. **Register**

    To get the model for the registration form, make a `GET` request to `/register`. This will return a JSON representation of the form along with the available Account Stores.

    ```
    {
      "form": {
        "fields": [
          {
            "enabled": true,
            "label": "First Name",
            "placeholder": "First Name",
            "required": true,
            "type": "text"
          },
          {
            "enabled": true,
            "label": "Last Name",
            "placeholder": "Last Name",
            "required": true,
            "type": "text"
          },
          ...
        ]
      },
      "accountStores": [
        {
          "href": "https://api.stormpath.com/v1/directories/6t1orcyGhqLvObgvsohdYu",
          "name": "Test Directory",
          "provider": {
            "href": "https://api.stormpath.com/v1/directories/6t1orcyGhqLvObgvsohdYu/provider",
            "providerId": "stormpath"
          }
        }
      ]
    }

    ```

    When you want to register a new Account, take the user data from the form model and put into the body of a `POST` request to the `/register` endpoint.
10. **That's It!**

You just added user authentication to your app with Stormpath.

Support
-------

[](#support)

If you are having issues with this package, please feel free to submit an issue on this github repository. If it is an issue you are having that needs a little more private attention, please feel free to contact us at [support@stormpath.com](mailto:support@stormpath.com?subject=Stormpath+Lumen+Integration) or visit our [support center](https://support.stormpath.com).

Contributing
------------

[](#contributing)

We welcome anyone to make contributions to this project. Just fork the `develop` branch of this repository, make your changes, then issue a pull request on the `develop` branch.

Any pull request you make will need to have associated tests with them. If a test is not provided, the pull request will be closed automatically. Also, any pull requests made to a branch other than `develop` will be closed and a new submission will need to be made to the `develop` branch.

We regularly maintain this repository, and are quick to review pull requests and accept changes!

Copyright
---------

[](#copyright)

Copyright © 2013-2016 Stormpath, Inc. and contributors.

This project is open-source via the [Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 57.1% 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 ~31 days

Recently: every ~47 days

Total

9

Last Release

3432d ago

### Community

Maintainers

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

---

Top Contributors

[![rdegges](https://avatars.githubusercontent.com/u/90247?v=4)](https://github.com/rdegges "rdegges (4 commits)")[![bretterer](https://avatars.githubusercontent.com/u/1906920?v=4)](https://github.com/bretterer "bretterer (2 commits)")[![JunkMyFunk](https://avatars.githubusercontent.com/u/2786106?v=4)](https://github.com/JunkMyFunk "JunkMyFunk (1 commits)")

---

Tags

laravelAuthenticationauthorizationUsersaccountsstormpath

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stormpath-lumen/health.svg)

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

###  Alternatives

[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

71510.9M66](/packages/laravel-mcp)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6712.1k2](/packages/hasinhayder-tyro)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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