Skip to content

Commit

Permalink
Updated SDK to align with Cloud Api 4.1.0-1 (#1169)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianwium authored Dec 3, 2024
1 parent ab2276f commit 93860f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -618,11 +618,11 @@ await Task.Run(async () =>
private async Task<string?> GetCredentialReferentByClientReferentOrNull(ITenantClient clientHolder, ArtifactType artifactType,
KeyValuePair<string, string> clientReferent, bool throwNotFound)
{
var wqlQueryString = $"{{\"attr::{clientReferent.Key}::value\":\"{clientReferent.Value}\"}}";

switch (artifactType)
{
case ArtifactType.Indy:
var wqlQueryString = $"{{\"attr::{clientReferent.Key}::value\":\"{clientReferent.Value}\"}}";

var credsIndy = await clientHolder.GetIndyCredentialsAsync(null, null, wqlQueryString);

if (credsIndy?.Results?.Count > 1)
Expand All @@ -637,7 +637,7 @@ await Task.Run(async () =>
return null;
}

var resultIndy = credIndy?.Referent?.Trim();
var resultIndy = credIndy?.Credential_id?.Trim();
if (string.IsNullOrEmpty(resultIndy))
throw new InvalidOperationException($"Credential referent expected but is null / empty client referent '{clientReferent}'");
return resultIndy;
Expand All @@ -646,7 +646,8 @@ await Task.Run(async () =>
VCRecordList? credsW3C = null;
try
{
credsW3C = await clientHolder.GetW3CCredentialsAsync(null, null, wqlQueryString);
credsW3C = await clientHolder.GetW3CCredentialsAsync(null, null, null);
//TODO: filter based on clientReferent.Value
}
catch (Aries.CloudAPI.DotnetSDK.AspCore.Clients.Exceptions.HttpClientException ex)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public static Domain.SSI.Models.Provider.Credential ToCredential(this IndyCredIn
{
return new Domain.SSI.Models.Provider.Credential
{
Id = o.Referent,
Id = o.Credential_id,
SchemaId = o.Schema_id,
Attributes = o.Attrs
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="didx.aries-cloudapi-dotnet-aspcore" Version="1.3.0" />
<PackageReference Include="didx.aries-cloudapi-dotnet-aspcore" Version="1.3.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.10">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 93860f9

Please sign in to comment.