toResourceServerHttpResponse
Converts this error of a resource endpoint accessed with an access token (credential, userinfo) to the response to send, with the toOAuth2Error as JSON:
invalid_tokenandinvalid_dpop_proof: status 401 withWWW-Authenticate(RFC 6750 3., RFC 9449 7.1)use_dpop_nonce: status 401 withWWW-AuthenticateandDPoP-Nonce(RFC 9449 9.)any other error, e.g. the credential errors of OpenID4VCI: status 400, for
use_attestation_challengewithOAuth-Client-Attestation-Challenge(OA-ABCA 7.4)
authorizationHeader is the value of the request's Authorization header, whose scheme (DPoP or Bearer) is used for WWW-Authenticate; use_dpop_nonce and invalid_dpop_proof always use DPoP, and a missing header Bearer. WWW-Authenticate carries only the error code, never the description.