...
Code Block |
---|
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "action": "update", "authentication_method": { "id": "057413fb-2c2e-4f33-b2d6-433469212744", "alias": "roksolana", "default": "true" } } } |
if action = insert
Code Block |
---|
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "action": "insert", "authentication_method": { "type": "THIRD_PERSON", "value": "d12888c0-1159-4296-8f03-a592c136f673", "phone_number` : "+380656779678", "alias": "roksolana" } } } |
...
Field
type
must beTHIRD_PERSON
. (where person_auth_method.id = $authentication_method.id)check this auth_method .default=Falseis not primary
if action = update
validate authentication_methods.id belong to this person. Search auth method of this person where MPI.person_authentication_method.person_id = $.person.id
in case error return 422, "such authentication method does not belong to this person"
set
default
only for auth_method.type = THIRD_PERSONoptional field
default
must be only = TRUEalias
anddefault
is optiomal, but minimum one of two filds is required.
if action = insert
...
Set default auth method of person on IL.auth_method_request.auth_method_current - use function in mpi, that return default primary auth method.
Validate that auth_method_current !=NA if
action = deactivate
action = update
action = insert and type= THIRD_PERSON
else errror - “
person authentication method is undefined
“
...