public static List <Claim> AddCertificate(this List <Claim> claims, X509Certificate2 certificate) { if (claims != null && certificate != null) { claims.Add(new Claim(_publicKeyClaimType, TagPubKey.Resolve(certificate).TextualRepresentation)); claims.Add(new Claim(_senderIdClaimType, KeyId.Resolve(certificate).TextualRepresentation)); claims.Add(new Claim(_senderNameClaimType, certificate.FriendlyName)); } return(claims); }
public static TagPubKey PubKey(this X509Certificate2 certificate) => TagPubKey.Resolve(certificate);
internal static TagPubKey PublicKey(this IEnumerable <Claim> claims) => BuildFrom(ClaimValue(claims, _publicKeyClaimType), textual => TagPubKey.Resolve(textual));