...
If IL_DB.authentication_method_request.status =
NEW
:
If person < 14, check that count(auth_method, where person.auth_methods.person_id = $.person_id) >=1 left
validate auth_method_request.auth_method_current:
If auth_method_request.auth_method_current = OTP - Verificate sms (Invoke verification module to verify OTP (OTP Verification))
If auth_method_request.auth_method_current = OFFLINE - verificate download documents
If deactivate auth_method where field
default
= True, then the method that was last added has a flagdefault
= True
Update authentication method request
Change entity status in IL_DB.authentication_method_request to COMPLETED
Set updated_at - now() (Get current date-time)
Set updated_by - user_id (Extract user from token)
Update mpi.person_authentication_method:
set ended_at = now() (Get current date-time)
If deactivated auth_method where field
default
= True, then the method that was last added set a flagdefault
= True
action = insert
If IL_DB.authentication_method_request.status =
NEW
:
...