image.png

Steps to Verify Nafath FE

  1. Call verification/verifyNafath this will return a number.
    1. Mobile team will need to send isMobile=true as param to bypass signalR requirement
  2. Call the IdentityNafathCallback with users CR/NationalID.
    1. For web it is mocked it will be triggered on BE automatically within 5 secs its a possibility it wont mock due to connection-socket not made with BE due to network issues. If that happens callback should be used.
  3. Verify if user has completed Nafath verification:
    1. For Web this can be done through Socket/SignalR-Hub
    2. For Mobile API nafath/status needs to be called

Flow Details

  1. FE calls verification/verifyNafath this will return a number from nafath against CR/NationalId.
    1. User requests AccountsService for random nafath number
    2. AccountsService forwards the request to BNPLNafathIntegrationService(clone of finance)
    3. BNPLNafathIntegrationService forwards the request to NafathService to get the number
      1. This can return 500 for freeze timeout - on concurrent calls , est 2 minutes, can put a techdebt for future to implement Redis to return persistent number for 2min
  2. Nafath Verification
    1. User taps correct number on nafath screen
    2. NafathService triggers a callback IdentityNafathCallback would check for open connectionId and forwards the payload to BusinessRegistration
    3. BusinessRegistration will mark the isNafathVerified=true for all entities against CRNum & NationalId
  3. Nafath Verified, FE notified
    1. For Web this can be done through Socket/SignalR-Hub
    2. For Mobile API nafath/status needs to be called on BusinessRegistration which will return them {"nafathVerified": true }

Author:

Ashad Nadeem Mahmudi