-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for openid4vp response encryption (JARM) #2046
Conversation
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
🦋 Changeset detectedLatest commit: f9773c4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!! Some small remarks
let jarmEncryptionJwk: (JwkJson & { kid: string; use: 'enc' }) | undefined | ||
|
||
if (mode === SphereonResponseMode.DIRECT_POST_JWT) { | ||
const key = await agentContext.wallet.createKey({ keyType: KeyType.P256 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think key type should match the key type being used to sign the request (it could even be the same key?!)
nonce: input.nonce, | ||
}) | ||
|
||
const res = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const res = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt) | |
const req = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt) |
authorizationResponsePayload = request.body | ||
} | ||
|
||
verificationSession = await getVerificationSession(agentContext, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already fetch ot above. Can't we reuse that?
@@ -704,7 +708,7 @@ describe('OpenId4Vc', () => { | |||
}) | |||
}) | |||
|
|||
it('e2e flow with verifier endpoints verifying a sd-jwt-vc with selective disclosure', async () => { | |||
it('e2e flow (jarm) with verifier endpoints verifying a sd-jwt-vc with selective disclosure', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also keep a non-jarm test?
Oh also: should we add a simple check to make sure the jarm enc alg is supported etc? Also we don't add the required metadata params i think? |
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
Signed-off-by: Timo Glastra <timo@animo.id>
1d83159
into
openwallet-foundation:main
…t-foundation#2046) Signed-off-by: Martin Auer <martin.auer97@gmail.com>
No description provided.