plugin
plugin copied to clipboard
[Feature Request]: Allow autocompletion of Passport scope name
Feature Description
Scopes are defines as such:
class AppServiceProvider extends ServiceProvider {
public function boot(): void
{
Laravel\Passport\Passport::tokensCan([
'my-scope' => 'Scope description',
]);
}
}```
It would be great if we could allow for autocompletion of this in the default places where you use scopes, for example the `CheckClientCredentials::using($scopes)` middleware.
Allowing scope autocompletion to be added using the `ide.json` would also be really useful.
```json
{
"$schema": "https://laravel-ide.com/schema/laravel-ide-v2.json",
"completions": [
{
"complete": "passportScopeId",
"condition": [
{
"classFqn": ["\\App\\Http\\Middleware\\Auth\\EnsureScope"],
"methodNames": ["using"],
"parameters": [1]
}
]
}
]
}