Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions passport.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
- [Passing The Access Token](#passing-the-access-token)
- [Token Scopes](#token-scopes)
- [Defining Scopes](#defining-scopes)
- [Default Scope](#default-scope)
- [Assigning Scopes To Tokens](#assigning-scopes-to-tokens)
- [Checking Scopes](#checking-scopes)
- [Consuming Your API With JavaScript](#consuming-your-api-with-javascript)
Expand Down Expand Up @@ -654,6 +655,15 @@ You may define your API's scopes using the `Passport::tokensCan` method in the `
'check-status' => 'Check order status',
]);

<a name="default-scope"></a>
### Default Scope

If a client decides to omit the scope the server still choose to set a default scope. You can achieve setting a default scope by using the `setDefaultScope`. Values need to be separated with a space or be passed as an array:

use Laravel\Passport\Passport;

Passport::setDefaultScope('place-orders check-status');

<a name="assigning-scopes-to-tokens"></a>
### Assigning Scopes To Tokens

Expand Down