Skip to content

Commit 0b959f8

Browse files
committed
RR feedback
1 parent 130cce8 commit 0b959f8

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

docs/user-authentication.txt

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ Laravel Passport is an OAuth 2.0 server implementation that offers
164164
API authentication for Laravel applications. Use Laravel Passport if
165165
your application requires OAuth2 support.
166166

167+
.. tip::
168+
169+
To learn more about Laravel Passport and the OAuth 2.0 protocol, see
170+
the following resources:
171+
172+
- `Laravel Passport <https://laravel.com/docs/{+laravel-docs-version+}/passport>`__ in the
173+
Laravel documentation.
174+
175+
- `OAuth 2.0 <https://oauth.net/2/>`__ on the OAuth website.
176+
167177
Install Laravel Passport
168178
````````````````````````
169179

@@ -201,14 +211,13 @@ API requests. The following example adds the ``api`` authentication guard
201211
to the ``guards`` array:
202212

203213
.. code-block:: php
204-
:emphasize-lines: 7-10
214+
:emphasize-lines: 6-9
205215

206216
'guards' => [
207217
'web' => [
208218
'driver' => 'session',
209219
'provider' => 'users',
210220
],
211-
212221
'api' => [
213222
'driver' => 'passport',
214223
'provider' => 'users',
@@ -229,8 +238,8 @@ You can define the following {+odm-short+} model classes:
229238
- ``MongoDB\Laravel\Passport\RefreshToken``, which extends ``Laravel\Passport\RefreshToken``
230239
- ``MongoDB\Laravel\Passport\Token``, which extends ``Laravel\Passport\Token``
231240

232-
For example, the following code overrides the default ``Laravel\Passport\AuthCode``
233-
model class by defining a ``MongoDB\Laravel\Passport\AuthCode`` class and including
241+
The following example code extends the default ``Laravel\Passport\AuthCode``
242+
model class when defining a ``MongoDB\Laravel\Passport\AuthCode`` class and includes
234243
the ``DocumentModel`` trait:
235244

236245
.. code-block:: php
@@ -243,9 +252,10 @@ the ``DocumentModel`` trait:
243252
protected $keyType = 'string';
244253
}
245254

246-
After defining each custom model, instruct Passport to use the models in the ``boot()``
247-
method of your application's ``App\Providers\AppServiceProvider`` class, as shown
248-
in the following code:
255+
After defining custom models that extend each ``Laravel\Passport`` class, instruct
256+
Passport to use the models in the ``boot()`` method of your application's
257+
``App\Providers\AppServiceProvider`` class. The following example adds each custom
258+
model to the ``boot()`` method:
249259

250260
.. literalinclude:: /includes/auth/AppServiceProvider.php
251261
:language: php

0 commit comments

Comments
 (0)