Skip to content
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

Jarm #2046

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Jarm #2046

wants to merge 11 commits into from

Conversation

auer-martin
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: 2db46d9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@credo-ts/openid4vc Patch
@credo-ts/action-menu Patch
@credo-ts/anoncreds Patch
@credo-ts/askar Patch
@credo-ts/bbs-signatures Patch
@credo-ts/cheqd Patch
@credo-ts/core Patch
@credo-ts/drpc Patch
@credo-ts/indy-sdk-to-askar-migration Patch
@credo-ts/indy-vdr Patch
@credo-ts/node Patch
@credo-ts/question-answer Patch
@credo-ts/react-native Patch
@credo-ts/tenants Patch

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

Copy link
Contributor

@TimoGlastra TimoGlastra left a 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 })
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const res = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt)
const req = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt)

authorizationResponsePayload = request.body
}

verificationSession = await getVerificationSession(agentContext, {
Copy link
Contributor

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 () => {
Copy link
Contributor

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?

@TimoGlastra
Copy link
Contributor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants