using System.Security.Claims; namespace zero.Core.Entities { public class UserClaim : IUserClaim { /// public string Type { get; set; } /// public string Value { get; set; } /// public Claim ToClaim() => new Claim(Type, Value); /// public UserClaim FromClaim(Claim other) { Type = other?.Type; Value = other?.Value; return this; } } public interface IUserClaim { /// /// Gets or sets the claim type for this claim /// string Type { get; set; } /// /// Gets or sets the claim value for this claim /// string Value { get; set; } /// /// Constructs a new claim with the type and value /// UserClaim FromClaim(Claim other); /// /// Initializes by copying ClaimType and ClaimValue from the other claim /// Claim ToClaim(); } }