sendProximityPresentationRequest
This function uses the requested mobile credentials to construct and send a presentation request to the holder. This new function, replaces the old ProximityPresentationSession.requestMobileCredentials.
If the request is not valid, an exception will be thrown. Once the request has been sent, a response is expected. As per ISO/IEC 18013-5:2021, if no response is received after 300 seconds, the request will timeout and an exception will be thrown. The session will not be terminated and a new request can be sent. When the response is received, it will be decoded, verified and returned.
The verification process is performed as per ISO/IEC 18013-5:2021 specification, subsequently the credential revocation status is checked if skipStatusCheck is false
and the previous verifications have succeeded.
As per ISO/IEC 18013-5:2021, a response and sessionTermination status code can be received in the same response from the holder. In this scenario the method will return the response, trigger the onTerminated
callback and close the data transport session.
The SDK retrieves and caches status list tokens as part of the credential status check. Each status list token contains the following parameters:
ttl
(Time to Live): Recommended duration the relying party should use a token before retrieving a new one.exp
(Expiry): Absolute expiration time after which the token can no longer be used.
The SDK calculates a nextUpdateDate
as the earlier of:
retrieval time +
ttl
exp
Then based on the result:
If the current time is before
nextUpdateDate
, the SDK continues to use the cached token.If the current time is after
nextUpdateDate
, it attempts to retrieve a new status list token.
Offline behavior:
If the device is offline,
ttl
has passed butexp
has not, the status will beunknown
(as a fresh token cannot be fetched).If
exp
has passed, the status will be returned asunknown
.
To manage cache proactively:
Use updateTrustedIssuerStatusLists to forces a refresh of all relevant status list tokens. We recommend calling this regularly and before the
nextUpdateDate
to ensure up-to-date verification.Use getTrustedIssuerStatusListsCacheInfo to inspect current cache metadata, including the
nextUpdateDate
.
Return
The response as received from the holder as an instance of MobileCredentialResponse
Parameters
A list of requests represented as instances of MobileCredentialRequest.
Defines whether the revocation status check should be skipped. By default it is set to false
and status check will be performed. Network requests may be performed to check revocation status.
Throws
If an unsupported cryptographic curve is used.
If the device request validation fails.
If encoding the device request to bytes fails.
If a request is made on a terminated session.
If a request is already in progress.
If the session fails.
If the session decryption fails.
If sending the request fails.
If SDK is not engaged in a proximity presentation session.