...
Table of Contents |
---|
Specification
Authorize
Verify the validity of access token
Check user scope append_auth_method:write in order to perform this action
...
Validate request
Code Block | ||
---|---|---|
| ||
{ "$schema": "http://json-schema.org/append_auth_methoddraft-04/schema#", "type": "object", "properties": { "personauth_method_idrequest": { "type": "stringobject" , }, "third_personproperties": { "idtype": { "typeenum": [ "stringTHIRD_PERSON" ] }, "aliasvalue": { "type": "string" }, "requiredalias": [{ "idtype",: "string" "alias" } ] }, }, "required": [ "person_id", "type", "phone_number", "third_personalias" ] } } } |
Validate person id
...
Fiend value
is person
...
.id
validate person_id UUID
in case error return 422
search person by person_id , third_person_id in MPI
in case error return 422, "Such person doesn't exist"
Validate
Field type
must be third_person
.
Generate verification code
Invoke Initialize OTP to generate one time two passwords password and send it to person number and third_person number (that is added as a new auth method). At this stage, the patients receive an SMS messages to confirm this two phone and the consent to add new auth method to personmessage.
Phone_numbers:
mpi.person_auth_method.value, where person_id = $.person_id and id_primary=True
mpi.person_auth_method.value, where person_id = $.third_person.id and type = OTP
...