-
Notifications
You must be signed in to change notification settings - Fork 23
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: support parameter #967
feat: support parameter #967
Conversation
Signed-off-by: Bassam Riman <bassam.riman@iohk.io>
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.
Good job @CryptoKnightIOG. I left a couple of comments... 😉
} | ||
} | ||
|
||
case class AudienceParameter(aud: String) extends VcVerificationParameter |
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.
Do we really want to keep both the enum
part and the related xxxParameter(xxx)
part? It seems like there is always a 1:1 mapping between them. Keeping both allows the user to mix unrelated types together (e.g. SubjectCheck
with AudienceParameter
). Why don't we just have AudienceCheck(aud: String)
instead?
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.
You are right, will fix it in follow up
final case class VcVerificationRequest( | ||
credential: String, | ||
verifications: List[VcVerification] | ||
verification: VcVerification, |
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.
Why not revert to what you did before, that is, passing a list of verifications to the service verify
method? This allows one to make a single service call to check, e.g. 10 properties of a VC, instead of making 10 separate calls. I find it more efficient and elegant...
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 am not passing a list of VcVerificationRequest in a single call. It simplifies the logic.
case SemanticCheckOfClaims | ||
} | ||
|
||
object VcVerification { |
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.
It's up to you @CryptoKnightIOG, but if you want to reduce the conversion logic, you can also expose the VcVerification
from the service layer right away. It seems they have the exact same structure, right? We do that a lot in other parts of the codebase...
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.
Will fix in follow up
4be27ab
into
ATL-6785-6789-Semantic-Subject-Verification
https://input-output.atlassian.net/browse/ATL-6913