Skip to content

Commit

Permalink
remove obsolete issuer name from sd-jwt record
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Tuerk <johannes.tuerk@lissi.id>
  • Loading branch information
JoTiTu committed Aug 15, 2024
1 parent ae51469 commit f8bc917
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,11 @@ public static SdJwtRecord ToRecord(
};
})
.ToList();

var issuerName = issuerMetadata
.Display
.ToNullable()?
.ToDictionary(
issuerDisplay => issuerDisplay.Locale.ToNullable()?.ToString(),
issuerDisplay => issuerDisplay.Name.ToNullable()?.ToString());

var record = new SdJwtRecord(
sdJwtDoc,
claims!,
display!,
issuerName!,
keyId);

return record;
Expand Down
15 changes: 0 additions & 15 deletions src/WalletFramework.SdJwtVc/Models/Records/SdJwtRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@ public sealed class SdJwtRecord : RecordBase, ICredential
/// </summary>
public Dictionary<string, string> Claims { get; set; }

/// <summary>
/// Gets or sets the name of the issuer in different languages.
/// </summary>
public Dictionary<string, string>? IssuerName { get; set; }

/// <summary>
/// Gets the disclosures.
/// </summary>
Expand Down Expand Up @@ -110,7 +105,6 @@ public SdJwtRecord()
/// </summary>
/// <param name="displayedAttributes">The attributes that should be displayed.</param>
/// <param name="claims">The claims made.</param>
/// <param name="issuerName">The name of the issuer in different languages.</param>
/// <param name="disclosures">The disclosures.</param>
/// <param name="display">The display of the credential.</param>
/// <param name="issuerId"></param>
Expand All @@ -119,7 +113,6 @@ public SdJwtRecord()
public SdJwtRecord(
Dictionary<string, ClaimMetadata> displayedAttributes,
Dictionary<string, string> claims,
Dictionary<string, string> issuerName,
ImmutableArray<string> disclosures,
List<SdJwtDisplay> display,
string issuerId,
Expand All @@ -132,8 +125,6 @@ public SdJwtRecord(
DisplayedAttributes = displayedAttributes;

EncodedIssuerSignedJwt = encodedIssuerSignedJwt;

IssuerName = issuerName;

IssuerId = issuerId;
}
Expand All @@ -142,7 +133,6 @@ public SdJwtRecord(
string serializedSdJwtWithDisclosures,
Dictionary<string, ClaimMetadata> displayedAttributes,
List<SdJwtDisplay> display,
Dictionary<string, string> issuerName,
KeyId keyId)
{
Id = Guid.NewGuid().ToString();
Expand All @@ -154,8 +144,6 @@ public SdJwtRecord(
Display = display;
DisplayedAttributes = displayedAttributes;

IssuerName = issuerName;

KeyId = keyId;
IssuerId = sdJwtDoc.UnsecuredPayload.SelectToken("iss")?.Value<string>()
?? throw new ArgumentNullException(nameof(IssuerId), "iss claim is missing or null");
Expand All @@ -167,7 +155,6 @@ public SdJwtRecord(
SdJwtDoc sdJwtDoc,
Dictionary<string, ClaimMetadata> displayedAttributes,
List<SdJwtDisplay> display,
Dictionary<string, string> issuerName,
KeyId keyId)
{
Id = Guid.NewGuid().ToString();
Expand All @@ -178,8 +165,6 @@ public SdJwtRecord(
Display = display;
DisplayedAttributes = displayedAttributes;

IssuerName = issuerName;

KeyId = keyId;
IssuerId = sdJwtDoc.UnsecuredPayload.SelectToken("iss")?.Value<string>()
?? throw new ArgumentNullException(nameof(IssuerId), "iss claim is missing or null");
Expand Down

0 comments on commit f8bc917

Please sign in to comment.