diff --git a/src/Command/ClearExpiredTokensCommand.php b/src/Command/ClearExpiredTokensCommand.php index 2d37c528..16c6985b 100644 --- a/src/Command/ClearExpiredTokensCommand.php +++ b/src/Command/ClearExpiredTokensCommand.php @@ -7,12 +7,14 @@ use League\Bundle\OAuth2ServerBundle\Manager\AccessTokenManagerInterface; use League\Bundle\OAuth2ServerBundle\Manager\AuthorizationCodeManagerInterface; use League\Bundle\OAuth2ServerBundle\Manager\RefreshTokenManagerInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +#[AsCommand(name: 'league:oauth2-server:clear-expired-tokens', description: 'Clears all expired access and/or refresh tokens and/or auth codes')] final class ClearExpiredTokensCommand extends Command { /** diff --git a/src/Command/CreateClientCommand.php b/src/Command/CreateClientCommand.php index dec3e098..a6b66ea3 100644 --- a/src/Command/CreateClientCommand.php +++ b/src/Command/CreateClientCommand.php @@ -9,6 +9,7 @@ use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -16,6 +17,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +#[AsCommand(name: 'league:oauth2-server:create-client', description: 'Creates a new OAuth2 client')] final class CreateClientCommand extends Command { /** diff --git a/src/Command/DeleteClientCommand.php b/src/Command/DeleteClientCommand.php index 725feb8f..73302780 100644 --- a/src/Command/DeleteClientCommand.php +++ b/src/Command/DeleteClientCommand.php @@ -5,12 +5,14 @@ namespace League\Bundle\OAuth2ServerBundle\Command; use League\Bundle\OAuth2ServerBundle\Manager\ClientManagerInterface; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +#[AsCommand(name: 'league:oauth2-server:delete-client', description: 'Deletes an OAuth2 client')] final class DeleteClientCommand extends Command { /** diff --git a/src/Command/ListClientsCommand.php b/src/Command/ListClientsCommand.php index 5e297794..6e720473 100644 --- a/src/Command/ListClientsCommand.php +++ b/src/Command/ListClientsCommand.php @@ -10,12 +10,14 @@ use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +#[AsCommand(name: 'league:oauth2-server:list-clients', description: 'Lists existing OAuth2 clients')] final class ListClientsCommand extends Command { private const ALLOWED_COLUMNS = ['name', 'identifier', 'secret', 'scope', 'redirect uri', 'grant type']; @@ -35,7 +37,7 @@ public function __construct(ClientManagerInterface $clientManager) protected function configure(): void { $this - ->setDescription('Lists existing oAuth2 clients') + ->setDescription('Lists existing OAuth2 clients') ->addOption( 'columns', null, diff --git a/src/Command/UpdateClientCommand.php b/src/Command/UpdateClientCommand.php index ba4cd96f..c462a60d 100644 --- a/src/Command/UpdateClientCommand.php +++ b/src/Command/UpdateClientCommand.php @@ -8,6 +8,7 @@ use League\Bundle\OAuth2ServerBundle\ValueObject\Grant; use League\Bundle\OAuth2ServerBundle\ValueObject\RedirectUri; use League\Bundle\OAuth2ServerBundle\ValueObject\Scope; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -15,6 +16,7 @@ use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; +#[AsCommand(name: 'league:oauth2-server:update-client', description: 'Updates an OAuth2 client')] final class UpdateClientCommand extends Command { /**