...
Code Block |
---|
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "action": "update", "authentication_methods": { "id": "057413fb-2c2e-4f33-b2d6-433469212744", "alias": "roksolana", "is_primarydefault": "true" } } } |
Validate ids
...
if action =
delete
Field
type
must bethird_person
. (where person_auth_method.id = $aythentication_method.id)If person < 14, validate that count(auth_method, where person.auth_methods.person_id = $.person_id) >=1
If delete auth_method where field
is_primary
default
= True, then the method that was last added has a flagis_primary
default
= True
if action =
insert
if type = OTP or OFFLINE, person’s auth method that was before (off or offline) becomes inactive
if action =
update
if the transferred method is the main one (is_primary
default
= TRUE), method that had this flagis_primary default = TRUE
now hasis_primary = FALSE
default = FALSE
if person>18, can’t set
default
= TRUE where auth_method.type=third_person
Generate verification code
...