Versions Compared

Key

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

A person can have an array of authentication methods.
To determine necessery the method of patient authentication, we select default auth method. If there is no active default, select the Aus method = OTPif person hasn’t active authentication_method - return null.

If person has active auth_method.type = OTP - select it, if it is not - select active auth_method.type =OFFLINE. And if there is no OTP or OFFLINE, select the one that is of the active auth method with type = third_person where type = OTP and the last first one is added. Then the auth method isn’t found, select the first added active auth method.type =third person where third_person.auth_method.type = OFFLINE. If nothing is found, return null.

...

View file
namechoose_auth_method_current.graphml

This method return person’s auth method. which person can use and one of this method has primary=True.

Example when adult person has selt auth_method = OTP and three auth_method with type = third_person (third_person_1 has auth_method.type = NA, third_person_2 has auth_method.type = OTP and third_person_3 has auth_method.type = OFFLINE ).

Code Block
  [
{ type : OTP,
phone_number : +380951111119,
is_primary : TRUE},

{type : THIRD_PERSON,
value : 6eaeea53-47ac-459a-bcd8-c90a36947de6,
reference: { 
  type = OTP,
  phone_number : +380952222222}
is_primary : FALSE},

type : THIRD_PERSON,
value : b8c6679d-0df2-4407-8c3e-3fe58fa32655,
reference: { 
  type = OFFLINE},
is_primary : FALSE}
]

So if person has third_person, then show info of the third_person’s auth_method where type = OTP or OFFLINE.

If person has auth_method.type = NA or third_preson.type = NA or person hasn’t active auth method - then don’t show this methods (if NA) and return NULL.