diff --git a/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts b/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts index 552a3667..2a1fe875 100644 --- a/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts +++ b/packages/siop-oid4vp/lib/authorization-request/AuthorizationRequest.ts @@ -123,7 +123,7 @@ export class AuthorizationRequest { if (parsedJwt) { requestObjectPayload = parsedJwt.payload as RequestObjectPayload - const jwtVerifier = await getRequestObjectJwtVerifier({ ...parsedJwt, payload: requestObjectPayload }, { type: 'request-object', raw: jwt }) + const jwtVerifier = await getRequestObjectJwtVerifier({ ...parsedJwt, payload: requestObjectPayload }, { raw: jwt }) const result = await opts.verifyJwtCallback(jwtVerifier, { ...parsedJwt, raw: jwt }) if (!result) { throw Error(SIOPErrors.ERROR_VERIFYING_SIGNATURE) diff --git a/packages/siop-oid4vp/lib/types/JwtVerifier.ts b/packages/siop-oid4vp/lib/types/JwtVerifier.ts index d1ca0c53..c0d7e2b2 100644 --- a/packages/siop-oid4vp/lib/types/JwtVerifier.ts +++ b/packages/siop-oid4vp/lib/types/JwtVerifier.ts @@ -158,7 +158,7 @@ export const getRequestObjectJwtVerifier = async ( } else if (clientIdScheme === 'verifier_attestation') { const verifierAttestationSubtype = 'verifier-attestation+jwt' if (!jwt.header.jwt) { - throw new Error(SIOPErrors.MISSING_ATTESTATION_JWT) + throw new Error(SIOPErrors.MISSING_ATTESTATION_JWT_WITH_CLIENT_ID_SCHEME_ATTESTATION) } // TODO: is this correct? not 100% sure based on the spec if (jwt.header.typ !== verifierAttestationSubtype) {