Authorize user
Verify the validity of access token
Return 401 in case validation fails
Check scopes in order to perform this action (scope = 'append_auth_method:write')
Return 403 in case invalid scope(s)
Verification SMS
Verificate two sms - from person and from third_person.
Invoke verification module to verify OTP
Update mpi
Add to table person_auth_methods
row with type = third_person
, value = id (confidant_person_id), alias (from payload), is_primary = False
Start date: start_date = Current_date()
End date:
if (person.age < 18) { end_date = min(birth_date + 18y - 1d, start_date + third_person_term);} else { end_date = start_date + third_person_term;}