prepareAuthorizationResponse

Parses input, i.e. a URL, the form-encoded parameters or a request object of an authorization request, and validates it with OpenId4VpHolder.startAuthorizationResponsePreparation of openId4VpHolder. Show the resulting state to the user, and resume with OpenId4VpHolder.finalizeAuthorizationResponse.

A request object passed by reference in request_uri is fetched with GET (RFC 9101), or, for request_uri_method=post, with POST and wallet_metadata and wallet_nonce as form (OpenID4VP 1.0, 5.10), always with Accept: application/oauth-authz-req+jwt. The body of a successful answer is the request object, whatever its Content-Type; it is decrypted if it has been encrypted to the key advertised in wallet_metadata, and must carry the wallet_nonce sent. A non-success answer, including a redirect, fails with HttpErrorResponseException.

Sends [RequestObject], i.e. RequestObject for a request object passed by reference only.


Parses input, loads the request object as prepareAuthorizationResponse does, and validates the request with OpenId4VpHolder.startAuthorizationResponsePreparation of openId4VpHolder under policy, returning its report next to the state. A rejected request still finishes the exchange with its report and state, so the wallet can show why, answer with an error response, or continue after the user decided to; the exchange fails only for transport errors and input that can not be parsed.

The wallet_nonce of a request object is consumed by validating it, so validate a request once, either with this method or with prepareAuthorizationResponse, never with both.

Sends [RequestObject], i.e. RequestObject for a request object passed by reference only.