Open nodh opened 1 week ago
Why does this behave differently from JwsSigned, that has the typed payload as property? should not the seriializer handle conversion from/to bytestringwrapper?
In VCK, there's bytestringwrapper all over the place, i think we can do away with it and add this wrapping logic into the serializer, while we're at it
@n0900 can this be made more convenient: as in: directly pass the typed payload to the constructor and have the serializer handle the byte string wrapping? I know it's different from your serialization foo, because it can by any type, but still…
Best I can do with my knowledge of kotlinx serialization ... CoseSignedSerializer
can't handle the payload directly, because it doesn't know about the type of the payload, since it's referenced by annotation on CoseSigned
. In contrast, JwsSigned
itself is not annotated with @Serializable
, so it is easier there. I'm happy for any suggestions on how to solve the shortcomings.
Adds a type parameter to
CoseSigned
. While not as thorough as forJwsSigned
, it's still worth it to provide some form of guidance to clients as which payload to expect.See also https://github.com/a-sit-plus/vck/pull/165