sendProximityPresentationRequest

suspend fun sendProximityPresentationRequest(    request: List<MobileCredentialRequest>,     skipStatusCheck: Boolean = false): MobileCredentialResponse

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 but exp has not, the status will be unknown (as a fresh token cannot be fetched).

  • If exp has passed, the status will be returned as unknown.

To manage cache proactively:

Return

The response as received from the holder as an instance of MobileCredentialResponse

Parameters

request

A list of requests represented as instances of MobileCredentialRequest.

skipStatusCheck

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

IllegalStateException

If SDK is not engaged in a proximity presentation session.