Esempio n. 1
0
 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);
 }