preauthorizedOffer

suspend fun preauthorizedOffer(call: ApplicationCall)

Server-to-server RPC that System of Record can call to create pre-authorized offers at this issuance server.

This request is outside of scope of OpenID4VCI and thus is not specified in the standard.

Issuance server is assumed to be trusted by the System of Record, its address must be specified in the System of Record configuration and not come from external/untrusted sources.

Request format:

{
"access_token": "...", // OpenID access token
"expires_in": "...", // Number of seconds that access_token stays valid
"refresh_token": "...", // OpenID refresh token
"scope": "...", // record type (or "core")
"instance": "...", // record instance (ignored for "core")
"tx_kind": "...", // transaction code kind
"tx_prompt": "..." // transaction code prompt
}

Credential offer is generated for all credential types that reference the given scope.

Response:

[
{
credential_id: "...",
display: { ... }, // openid4vci display structure
offer: "...", // credential offer url
tx_code: "..." // generated transaction code if any
},
...
]