-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add PresentationExchange.selectCredentials #25
Conversation
} | ||
} | ||
|
||
public static func parse(jwtString: String) throws -> ParsedJWT { |
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.
just fyi as parse is getting renamed in 'decode' I think (this is how it is in go):
lots of new decoding logic here for making sure jwt is valid vcjwt
decentralized-identity/web5-js#421
and when we get to the verify part of the vcJwt the plan is to split up verify into lots of parts with verify options - decentralized-identity/web5-js#425
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.
Wow great job, looking good so far! 👏 |
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.
looks great! seems like there's a bit more work to be done wrt neal's comment about additional JWT decode checks in the works for web5-js also applying 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.
looks great,
As a quick follow up I would try to add the swift package to use the test vectors - https://github.com/TBD54566975/web5-spec/blob/main/test-vectors/presentation_exchange/select_credentials.json
( I can help with that )
and adding a lot more dynamic valid / invalid pd unit tests like we have here: https://github.com/TBD54566975/web5-kt/blob/main/credentials/src/test/resources/pd_filter_array.json
nice, thanks @nitro-neal! yeah i wrote in the description for now
appreciate the reviews so far everyone! will [at] everyone again when test cases are added lol |
Adds
PresentationExchange.selectCredentials
to return an array of selectable vcJwts given a presentation definitionPresentationExchange.satisfiesPresentationDefinition
that returns void and throws if a set of VCs fails to satisfy a given PD.Inspired by our
kt
andjs
implementations ✨Note: WIP but pls review early and lmk any questions. Still adding a few more test cases.
closes #3