コード例 #1
0
        private void SetSecurityTokenReference(X509Certificate2 signingCertificate, X509ReferenceType securityTokenType)
        {
            var securityTokenReference = SecurityTokenReferenceProvider.Create(signingCertificate, securityTokenType);

            SigningKey = GetSigningKeyFromCertificate(signingCertificate);
            KeyInfo    = new KeyInfo();

            KeyInfo.AddClause(securityTokenReference);
        }
コード例 #2
0
 /// <summary>
 /// Creates the <see cref="SecurityTokenReference"/> instance that must be used.
 /// </summary>
 /// <returns></returns>
 public SecurityTokenReference BuildSecurityTokenReference()
 {
     return(SecurityTokenReferenceProvider.Create(EncryptionCertificate, _securityTokenReferenceType));
 }