Closed hugoib closed 3 months ago
Here the section of the specs that addresses this issue https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#section-4.1.1-4.2.1
@francis-pouatcha I've were the problem comes from. We read the code
instead of the pre-authorized_code
for the pre-authorized code grant type
String code = formParams.getFirst(OAuth2Constants.CODE);
if (code == null) {
String errorMessage = "Missing parameter: " + OAuth2Constants.CODE;
event.detail(Details.REASON, errorMessage);
event.error(Errors.INVALID_CODE);
throw new CorsErrorResponseException(cors, OAuthErrorException.INVALID_REQUEST,
errorMessage, Response.Status.BAD_REQUEST);
}
fixed with commit #5f5f2d1475639968970fd62f7b53f20a5723d5e7
Resolved with:
For the demo, the following change was made inside the wallet:
Keycloak receives 'code' instead of 'pre-authorized-code'
Review the spec and fix where necessary.