runWithOutput method

  1. @override
Future<void> runWithOutput(
  1. Configuration<RevokeTokenCommandOption> commandConfig,
  2. CommandOutput output
)
override

Runs this command with prepared configuration and output.

Subclasses should override this method.

Implementation

@override
Future<void> runWithOutput(
  final Configuration<RevokeTokenCommandOption> commandConfig,
  final CommandOutput output,
) async {
  final tokenId = commandConfig.value(RevokeTokenCommandOption.tokenId);

  await renderCommand(
    output,
    operation: () => Auth.revokeToken(
      runner.serviceProvider.cloudApiClient,
      tokenId: tokenId,
      localStoragePath: globalConfiguration.scloudDir.path,
    ),
    textOutputUi: const AuthRevokeTokenTextUi(),
  );
}