Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

...

  1. if action = delete

    1. Field type must be third_person. (where person_auth_method.id = $aythentication_method.id)

    2. If person < 14, validate that count(auth_method, where person.auth_methods.person_id = $.person_id) >=1

    3. If delete auth_method where field is_primary default = True, then the method that was last added has a flag is_primary default = True

  2. if action = insert

    1. if type = OTP or OFFLINE, person’s auth method that was before (off or offline) becomes inactive

  3. if action = update

    1. if the transferred method is the main one (is_primary default = TRUE), method that had this flag is_primary default = TRUE now has is_primary = FALSE default = FALSE

    2. if person>18, can’t set default= TRUE where auth_method.type=third_person

Generate verification code

...