1
0
Fork 0
mirror of synced 2024-06-28 19:20:25 +12:00

fix: mfa type class

This commit is contained in:
Torsten Dittmann 2024-03-01 13:30:33 +01:00
parent 1ca143417c
commit e12a3edd9e
2 changed files with 3 additions and 2 deletions

View file

@ -3582,7 +3582,7 @@ App::post('/v1/account/mfa/:type')
->label('sdk.response.model', Response::MODEL_MFA_TYPE)
->label('sdk.offline.model', '/account')
->label('sdk.offline.key', 'current')
->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator. Must be `' . TYPE::TOTP . '`')
->param('type', null, new WhiteList([Type::TOTP]), 'Type of authenticator. Must be `' . Type::TOTP . '`')
->inject('requestTimestamp')
->inject('response')
->inject('project')
@ -3766,7 +3766,7 @@ App::post('/v1/account/mfa/challenge')
->label('sdk.response.model', Response::MODEL_MFA_CHALLENGE)
->label('abuse-limit', 10)
->label('abuse-key', 'url:{url},token:{param-token}')
->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP]), 'Factor used for verification. Must be one of following: `' . TYPE::EMAIL . '`, `' . TYPE::PHONE . '`, `' . TYPE::TOTP . '`.')
->param('factor', '', new WhiteList([Type::EMAIL, Type::PHONE, Type::TOTP]), 'Factor used for verification. Must be one of following: `' . Type::EMAIL . '`, `' . Type::PHONE . '`, `' . Type::TOTP . '`.')
->inject('response')
->inject('dbForProject')
->inject('user')

View file

@ -3,6 +3,7 @@
namespace Appwrite\Auth\MFA\Challenge;
use Appwrite\Auth\MFA\Challenge;
use Appwrite\Auth\MFA\Type;
use Utopia\Database\Document;
class Phone extends Challenge