2525public class VCIdentityService implements IdentityService {
2626 // This is the type of Verifiable Credential that the connector will search for
2727 // in the wallet and then present to the counter-party.
28- private static final String PRESENTED_VC_TYPE = "DataCellarCredential" ;
28+ private final String presentedVcType ;
2929
3030 private final Monitor monitor ;
3131 private final TypeManager typeManager ;
@@ -45,15 +45,17 @@ public class VCIdentityService implements IdentityService {
4545 * providers.
4646 * @param didTrustAnchor The trust anchor for decentralized identifiers.
4747 * @param uniresolverUrl The URL of the uniresolver service.
48+ * @param presentedVcType The type of Verifiable Credential to present.
4849 */
4950 public VCIdentityService (Monitor monitor , TypeManager typeManager , String clientId ,
50- WaltIDIdentityServices identityServices , String didTrustAnchor , String uniresolverUrl ) {
51+ WaltIDIdentityServices identityServices , String didTrustAnchor , String uniresolverUrl , String presentedVcType ) {
5152 this .monitor = monitor ;
5253 this .typeManager = typeManager ;
5354 this .clientId = clientId ;
5455 this .identityServices = identityServices ;
5556 this .didTrustAnchor = didTrustAnchor ;
5657 this .keyResolver = new KeyResolver (uniresolverUrl , monitor );
58+ this .presentedVcType = presentedVcType ;
5759 }
5860
5961 @ Override
@@ -63,7 +65,7 @@ public Result<TokenRepresentation> obtainClientCredentials(TokenParameters param
6365 monitor .info (
6466 String .format ("obtainClientCredentials: (audience=%s)" , audience ));
6567
66- PresentationDefinition presentationDefinition = new PresentationDefinition (PRESENTED_VC_TYPE );
68+ PresentationDefinition presentationDefinition = new PresentationDefinition (presentedVcType );
6769 MatchCredentialsResponse matchCredentialsResponse ;
6870
6971 try {
0 commit comments