Closed iaik-jheher closed 8 months ago
This is now superseded by the new CredentialRecord
interface used by CredentialRepositoryV2<C extends CredentialRecord>
. When CredentialRepositoryV2
is used instead of CredentialRepository
, the AssertionResultV2.getCredential()
method returns the concrete type C
set in the CredentialRepositoryV2
instance. This should allow the same and more flexibility in passing additional data up from the database layer, while also preserving types at compile time. I hope this satisfies your use case; if not, please let us know!
Ah, I should also note that these new features are available in experimental release 2.6.0-alpha4
.
As discussed in #274, this proposes an opaque, type-safe extra-data field on
RegisteredCredential
. This field can be used by library consumers to pass arbitrary data from their credential repository back up to their business logic.I've additionally taken the liberty of replacing the
@JsonCreator
constructor with Lombok's@Jacksonized
on the class itself; this should be equivalent for JSON deserialization purposes (the test cases check this), but allows the Lombok@Builder
annotation to generate its own private constructor.