ASPC.Marvel.CrimeAPI.MultipleSymmetricKeySecurityToken.MatchesKeyIdentifierClause C# (CSharp) Метод

MatchesKeyIdentifierClause() публичный Метод

Returns a value that indicates whether the key identifier for this instance can be resolved to the specified key identifier.
public MatchesKeyIdentifierClause ( System.IdentityModel.Tokens.SecurityKeyIdentifierClause keyIdentifierClause ) : bool
keyIdentifierClause System.IdentityModel.Tokens.SecurityKeyIdentifierClause A SecurityKeyIdentifierClause to compare to this instance
Результат bool
        public override bool MatchesKeyIdentifierClause(SecurityKeyIdentifierClause keyIdentifierClause)
        {
            if (keyIdentifierClause == null)
            {
                throw new ArgumentNullException("keyIdentifierClause");
            }

            // Since this is a symmetric token and we do not have IDs to distinguish tokens, we just check for the
            // presence of a SymmetricIssuerKeyIdentifier. The actual mapping to the issuer takes place later
            // when the key is matched to the issuer.
            if (keyIdentifierClause is SymmetricIssuerKeyIdentifierClause)
            {
                return true;
            }
            return base.MatchesKeyIdentifierClause(keyIdentifierClause);
        }