Main documentation sources:
-
Get user certificate from MobileID
/certificate
endpoint, passing it user's phone number and identity code. -
Prepare the XAdES signature structure for signing, aka
XmlSignature
, embedding into it the certificate obtained at the previous step. The signed data is derived from this structure. -
Display the verification code to the user, calculated based on the hash of the signed data.
-
Get the actual signature from the MobileID REST service.
-
Start a signing session by sending a request to
/signature
endpoint, complete with user's phone number and identity code, and the digest of the signed data. -
Poll the server for signing status, which returns the signature when successful.
-
Use the certificate obtained at step 1, to verify the signature
-
-
Finalize the
XmlSignature
structure with the received signature. (See the paragraph in SmartID for the details)