1
0
Fork 0
mirror of synced 2024-10-01 17:58:02 +13:00
This commit is contained in:
Matej Bačo 2022-05-06 07:44:29 +00:00
parent 55e73c7c67
commit ba620b28a3
2 changed files with 7 additions and 0 deletions

View file

@ -66,6 +66,7 @@ App::post('/v1/account')
/** @var Appwrite\Event\Event $audits */
/** @var Appwrite\Stats\Stats $usage */
// TODO: Here and everywhere else.. If you dont provide options, it should not be default algo options.. it should be empty. Only default options if we also default algo
$hashOptions = (\is_string($hashOptions)) ? \json_decode($hashOptions, true) : $hashOptions; // Cast to JSON array
$email = \strtolower($email);

View file

@ -23,6 +23,12 @@ class User extends Model
'default' => '',
'example' => 'John Doe',
])
->addRule('password', [
'type' => self::TYPE_STRING,
'description' => 'Hashed user password.',
'default' => '',
'example' => '$argon2id$v=19$m=2048,t=4,p=3$aUZjLnliVWRINmFNTWMudg$5S+x+7uA31xFnrHFT47yFwcJeaP0w92L/4LdgrVRXxE',
])
->addRule('hash', [
'type' => self::TYPE_STRING,
'description' => 'Password hashing algorithm.',