Thinktecture.IdentityModel.Tokens.AccessSecurityTokenHandler.GetIssuerThumbprint C# (CSharp) Method

GetIssuerThumbprint() protected method

Gets the issuer thumbprint.
protected GetIssuerThumbprint ( System.Security.Cryptography.Xml.SignedXml signedXml ) : string
signedXml System.Security.Cryptography.Xml.SignedXml The signed XML.
return string
        protected virtual string GetIssuerThumbprint(SignedXml signedXml)
        {
            Contract.Requires(signedXml != null);
            Contract.Ensures(!String.IsNullOrEmpty(Contract.Result<string>()));


            var keyName = signedXml.Signature.KeyInfo.OfType<KeyInfoName>().FirstOrDefault();
            
            if (keyName == null)
            {
                throw new CryptographicException("No KeyName found");
            }

            return keyName.Value;
        }