Skip to content

Commit

Permalink
Setting to disable tokens_can
Browse files Browse the repository at this point in the history
For projects that need to register scopes in a ServiceProvider, allow for disabling this packages scope registration.
  • Loading branch information
DellanX authored Feb 6, 2024
1 parent cd4b1e4 commit e93f547
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Laravel/PassportServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ public function boot()
__DIR__ . '/config/openid.php' => $this->app->configPath('openid.php'),
], ['openid', 'openid-config']);

Passport\Passport::tokensCan(config('openid.passport.tokens_can'));
$tokens_can = config('openid.passport.tokens_can', null);
if ($tokens_can) {
Passport\Passport::tokensCan($tokens_can);
}
}

public function makeAuthorizationServer(): AuthorizationServer
Expand Down

0 comments on commit e93f547

Please sign in to comment.