Skip to content

Commit

Permalink
Merge pull request #17 from sympla/task/lumen-provider
Browse files Browse the repository at this point in the history
Change Readme.md
  • Loading branch information
pedroigorsilva authored May 23, 2019
2 parents eb1bb88 + d7ee5dc commit d484e46
Showing 1 changed file with 38 additions and 2 deletions.
40 changes: 38 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ into `config/app.php`:

Sympla\Auth\Laravel\ServiceProvider::class


Then, publish the configuration:

$ php artisan vendor:publish --provider="Sympla\Auth\Laravel\ServiceProvider"
Expand Down Expand Up @@ -110,9 +109,46 @@ And the `providers` section:

Then, activate the `auth:api` as a middleware for your api.

## Using with Lumen

After install it, register the service provider into your Lumen application
into `bootstrap/app.php`:

$app->register(Sympla\Auth\Lumen\ServiceProvider::class);

After register the service provider, install the package for publish in Lumen application

$ composer require laravelista/lumen-vendor-publish

Then, publish the configuration:

$ php artisan vendor:publish --provider="Sympla\Auth\Lumen\ServiceProvider"

Once your application is configured, go to `config/auth.php` and change the `guard` section:

```
'guards' => [
'api' => [
'driver' => 'token',
'provider' => 'oauth',
],
],
```

And the `providers` section:

```
'providers' => [
'oauth' => [
'driver' => 'oauth'
'model' => App\User::class,
],
],
```

## Contact

Bruno Coelho <bruno.coelho@sympla.com.br>
Bruno Coelho <pedro.igor@sympla.com.br>

## License

Expand Down

0 comments on commit d484e46

Please sign in to comment.