From f1664c1cd7b03be7e34efd32be62e5fa9cfa70d3 Mon Sep 17 00:00:00 2001 From: loks0n <22452787+loks0n@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:09:15 +0000 Subject: [PATCH] fix: remove token auth.type --- app/controllers/api/account.php | 2 -- app/controllers/shared/api.php | 6 ------ app/controllers/shared/api/auth.php | 6 ------ 3 files changed, 14 deletions(-) diff --git a/app/controllers/api/account.php b/app/controllers/api/account.php index cd88ad2349..ecba060b90 100644 --- a/app/controllers/api/account.php +++ b/app/controllers/api/account.php @@ -1307,7 +1307,6 @@ App::put('/v1/account/sessions/magic-url') ->label('event', 'users.[userId].sessions.[sessionId].create') ->groups(['api', 'account']) ->label('scope', 'sessions.write') - ->label('auth.type', 'token') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') @@ -1338,7 +1337,6 @@ App::post('/v1/account/sessions/token') ->label('event', 'users.[userId].sessions.[sessionId].create') ->groups(['api', 'account']) ->label('scope', 'sessions.write') - ->label('auth.type', 'token') ->label('audits.event', 'session.create') ->label('audits.resource', 'user/{response.userId}') ->label('audits.userId', '{response.userId}') diff --git a/app/controllers/shared/api.php b/app/controllers/shared/api.php index a151b1fa83..3ebb7d96ec 100644 --- a/app/controllers/shared/api.php +++ b/app/controllers/shared/api.php @@ -311,12 +311,6 @@ App::init() } break; - case 'token': - if (($auths['token'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Token authentication is disabled for this project'); - } - break; - case 'phone': if (($auths['phone'] ?? true) === false) { throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Phone authentication is disabled for this project'); diff --git a/app/controllers/shared/api/auth.php b/app/controllers/shared/api/auth.php index 44d598ab32..b603726be0 100644 --- a/app/controllers/shared/api/auth.php +++ b/app/controllers/shared/api/auth.php @@ -55,12 +55,6 @@ App::init() } break; - case 'token': - if (($auths['token'] ?? true) === false) { - throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Token authentication is disabled for this project'); - } - break; - case 'phone': if (($auths['phone'] ?? true) === false) { throw new Exception(Exception::USER_AUTH_METHOD_UNSUPPORTED, 'Phone authentication is disabled for this project');