createAuthnRequest

suspend fun createAuthnRequest(requestOptions: OpenId4VpRequestOptions, vararg creationOptions: DcApiCreationOptions): KmmResult<CredentialRequestOptions>(source)

Creates a new authentication request for the W3C Digital Credentials API, i.e. the object that the relying party's frontend needs to pass to the browser in navigator.credentials.get().

requestOptions must use OpenIdConstants.ResponseMode.DcApi or OpenIdConstants.ResponseMode.DcApiJwt.

Pass more than one creationOptions to offer the same request over several exchange protocols in one browser call, e.g. DcApiCreationOptions.OpenId4VpSigned and DcApiCreationOptions.Iso180137AnnexC. Do not combine DcApiCreationOptions.OpenId4VpSigned and DcApiCreationOptions.OpenId4VpUnsigned, as the stored requests to validate the response would overwrite each other.