sendProximityPresentationRequest
This function uses the requested credentials to construct and send a request to the holder.
If the request is not valid, an error will be thrown.
Once the request has been sent, a response is expected. In accordance with ISO 18013-5, sessions must be terminated
after a period of inactivity. The specification recommends a minimum timeout of 300 seconds for no activity (sending or receiving session data).
The SDK implements this minimum, and will throw an error if no response is received within 300 seconds.
The session will not be terminated so a new request can be sent. When a response is received, it will be decoded, verified and returned.
The verification process is performed according to ISO 18013-5 specifications, subsequently the credential revocation status is checked if
checkStatus is true (or not supplied) and the previous verifications have succeeded.
As per ISO 18013-5 specifications, a response and sessionTermination status code can be received in the same
response from the holder. In this scenario the response will be returned by this method and the data transport session
will be closed.
If the holder closes the data transport link before a response is received (for example the holder turns Bluetooth
off or moves out of range), MobileCredentialVerifierErrorType.DataTransportDisconnected is returned. This is
expected proximity behaviour rather than a failure of the request itself.
When a response is received and processed, the SDK reports a verification event to the MATTR VII tenant configured in
platformConfiguration on initialize. The event describes the exchange: the requested credential types and claims,
and for each returned credential its type, verification result, validity dates, issuer common name and certificate
fingerprint, and any claims that were not returned. Claim values are not included. No event is reported when this
function returns or throws an error. Events are sent in the background and do not affect the returned
MobileCredentialResponse. If an event cannot be delivered, the SDK logs the failure and drops the event. On
Android, a submission rejected by rate limiting is retried up to three times first; on iOS it is not retried.
Signature
function sendProximityPresentationRequest(
options: SendProximityPresentationRequestOptions
): Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>Parameters
Prop
Type
Returns
Promise<Result<MobileCredentialResponse, SendProximityPresentationRequestError>>
The response as received from the holder as an instance of MobileCredentialResponse
Throws
InvalidParams if the provided arguments are missing or invalid.
MobileCredentialVerifierErrorType.SdkNotInitialized if the SDK has not been initialized.
How would you rate this page?