Once the user is diagnosed with Covid-19 they can share their Temporary Exposure Keys(TEK) to inform others, with whom they had contact with, about potential exposition to virus.
Steps:
- User diagnosed with Covid-19 is given a unique 6-character code (PIN) from the authority employee
- User enters the code and agrees for TEK upload (PWA module)
- PWA module notifies native code through JS bridge that provided PIN should be used for TEKs upload
- Exposure Notification Framework asks the user for a permission to share TEK with STOP COVID - ProteGO Safe App
- The app checks if 6-character code is valid by requesting STOP COVID - ProteGO Safe server for a Token (proper Firebase Cloud Function is called with PIN as a payload):
- UseCase: UploadTemporaryExposureKeysUseCase
- Repository function: TemporaryExposureKeysUploadRepository.getAccessToken(pinItem: PinItem)
- Repository implementation: TemporaryExposureKeysUploadRepositoryImpl.getAccessToken(pinItem: PinItem)
- The app generates Verification Payload(VP) using SafetyNet Attestation API. It helps to determine whether the server is interacting with a genuine app.
- UseCase: GetSafetyNetAttestationTokenUseCase
- Manager function: SafetyNetAttestationWrapper.attestFor(keys: List, regions: List)
- Manager implementation: SafetyNetAttestationWrapperImpl.attestFor(keys: List, regions: List)
- The app generates Upload Request Payload(URP) with the following data:
- array of Temporary Exposure Keys
- Token
- Verification Payload
- Platform name("Android")
- Region("PL")
- App package name("pl.gov.mc.protegosafe")
- The app uploads URP to STOP COVID - ProteGO Safe server with a proper Firebase Cloud Function
- UseCase: UploadTemporaryExposureKeysUseCase
- Repository function: TemporaryExposureKeysUploadRepository.uploadTemporaryExposureKeys(requestData: TemporaryExposureKeysUploadRequestData)
- Repository implementation: TemporaryExposureKeysUploadRepositoryImpl.uploadTemporaryExposureKeys(requestData: TemporaryExposureKeysUploadRequestData)