aboutsummaryrefslogtreecommitdiffstats
path: root/core/Command/User
diff options
context:
space:
mode:
authorLucas Azevedo <lhs_azevedo@hotmail.com>2023-08-24 11:42:30 -0300
committerLucas Azevedo <lhs_azevedo@hotmail.com>2023-08-24 11:42:30 -0300
commit5af683d2c4d0883ae9038c33078cbb792a0974e7 (patch)
tree1ddff2c9db59d8ccf11fba55b7f15e918ee52d4a /core/Command/User
parentf7bf468e22e74be7e00d3ffa2356ce4212f12760 (diff)
downloadnextcloud-server-5af683d2c4d0883ae9038c33078cbb792a0974e7.tar.gz
nextcloud-server-5af683d2c4d0883ae9038c33078cbb792a0974e7.zip
Namespace user auth token commands
Signed-off-by: Lucas Azevedo <lhs_azevedo@hotmail.com>
Diffstat (limited to 'core/Command/User')
-rw-r--r--core/Command/User/AuthTokens/Add.php (renamed from core/Command/User/AddAppPassword.php)7
-rw-r--r--core/Command/User/AuthTokens/Delete.php (renamed from core/Command/User/DeleteAuthToken.php)6
-rw-r--r--core/Command/User/AuthTokens/ListCommand.php (renamed from core/Command/User/AuthTokens.php)6
3 files changed, 10 insertions, 9 deletions
diff --git a/core/Command/User/AddAppPassword.php b/core/Command/User/AuthTokens/Add.php
index 8c506c8510e..e067c069c79 100644
--- a/core/Command/User/AddAppPassword.php
+++ b/core/Command/User/AuthTokens/Add.php
@@ -24,7 +24,7 @@ declare(strict_types=1);
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OC\Core\Command\User;
+namespace OC\Core\Command\User\AuthTokens;
use OC\Authentication\Events\AppPasswordCreatedEvent;
use OC\Authentication\Token\IProvider;
@@ -40,7 +40,7 @@ use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\Question;
-class AddAppPassword extends Command {
+class Add extends Command {
public function __construct(
protected IUserManager $userManager,
protected IProvider $tokenProvider,
@@ -52,7 +52,8 @@ class AddAppPassword extends Command {
protected function configure() {
$this
- ->setName('user:add-app-password')
+ ->setName('user:auth-tokens:add')
+ ->setAliases(['user:add-app-password'])
->setDescription('Add app password for the named user')
->addArgument(
'user',
diff --git a/core/Command/User/DeleteAuthToken.php b/core/Command/User/AuthTokens/Delete.php
index 13b63242b79..928387f1cc6 100644
--- a/core/Command/User/DeleteAuthToken.php
+++ b/core/Command/User/AuthTokens/Delete.php
@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OC\Core\Command\User;
+namespace OC\Core\Command\User\AuthTokens;
use OC\Core\Command\Base;
use OC\Authentication\Token\IProvider;
@@ -28,7 +28,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-class DeleteAuthToken extends Base {
+class Delete extends Base {
public function __construct(
protected IProvider $tokenProvider,
) {
@@ -37,7 +37,7 @@ class DeleteAuthToken extends Base {
protected function configure(): void {
$this
- ->setName('user:delete-auth-token')
+ ->setName('user:auth-tokens:delete')
->setDescription('Deletes an authentication token')
->addArgument(
'id',
diff --git a/core/Command/User/AuthTokens.php b/core/Command/User/AuthTokens/ListCommand.php
index 43fa687781e..6739e8b4648 100644
--- a/core/Command/User/AuthTokens.php
+++ b/core/Command/User/AuthTokens/ListCommand.php
@@ -20,7 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-namespace OC\Core\Command\User;
+namespace OC\Core\Command\User\AuthTokens;
use OC\Core\Command\Base;
use OC\Authentication\Token\IProvider;
@@ -30,7 +30,7 @@ use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
-class AuthTokens extends Base {
+class ListCommand extends Base {
public function __construct(
protected IUserManager $userManager,
protected IProvider $tokenProvider,
@@ -42,7 +42,7 @@ class AuthTokens extends Base {
parent::configure();
$this
- ->setName('user:auth-tokens')
+ ->setName('user:auth-tokens:list')
->setDescription('List authentication tokens of an user')
->addArgument(
'user',