1
0
Fork 0
mirror of synced 2024-07-01 04:30:59 +12:00

Make password, hash and hashOptions optional so that they are optional in SDKs, and nulled when returning from the account service

This commit is contained in:
Jake Barnby 2023-04-11 19:36:14 +12:00
parent dc626ea336
commit 58ba41a9c5
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -38,12 +38,14 @@ class User extends Model
->addRule('password', [
'type' => self::TYPE_STRING,
'description' => 'Hashed user password.',
'required' => false,
'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.',
'required' => false,
'default' => '',
'example' => 'argon2',
])
@ -58,6 +60,7 @@ class User extends Model
Response::MODEL_ALGO_MD5, // keep least secure at the bottom. this order will be used in docs
],
'description' => 'Password hashing algorithm configuration.',
'required' => false,
'default' => [],
'example' => new \stdClass(),
'array' => false,