IO Wallet SDK
    Preparing search index...

    Function parseAuthorizeRequest

    • Parses and optionally verifies a JWT containing an OpenID4VP Request Object.

      This method decodes the Request Object JWT and validates its structure. If the verifyJwt callback is provided, it also verifies the JWT signature using the public key obtained according to IT Wallet specifications:

      1. If client_id uses x509_hash: pass an x5c signer to the callback.
      2. If client_id uses openid_federation or a legacy HTTPS identifier, pass a federation signer; trust_chain is forwarded when present, otherwise the callback must reconstruct the chain from client_id.

      For x509_hash client identifiers, x5c is always required. When callbacks.hash is provided, this method also checks the SHA-256 base64url certificate digest embedded in client_id.

      Security: If verifyJwt callback is not provided in options, JWT signature verification is skipped.

      Returns Promise<ParsedAuthorizeRequestResult>

      A ParsedAuthorizeRequestResult containing the RP required credentials payload and the Openid4vpAuthorizationRequestHeader JWT header

      in case there are errors validating the Request Object structure

      in case the request object jwt is malformed (e.g missing header, bad encoding)

      ParseAuthorizeRequestError in case the JWT signature is invalid (when verifyJwt is provided) or there are unexpected errors