X509SecurityToken.MatchesKeyIdentifierClause Method (SecurityKeyIdentifierClause)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Returns a value indicating whether the key identifier for this instance is equal to the specified key identifier.

Namespace:   System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public override bool MatchesKeyIdentifierClause(
	SecurityKeyIdentifierClause keyIdentifierClause


Type: System.IdentityModel.Tokens.SecurityKeyIdentifierClause

An SecurityKeyIdentifierClause to compare to this instance.

Return Value

Type: System.Boolean

true if keyIdentifierClause is one of the X509SubjectKeyIdentifierClause, X509ThumbprintKeyIdentifierClause, X509IssuerSerialKeyIdentifierClause, or X509RawDataKeyIdentifierClause types and the key identifier clauses match; otherwise, false.

The MatchesKeyIdentifierClause method matches criteria in the X.509 certificate in the Certificate property based on the type of the keyIdentifierClause parameter. The following table details what is matched.

Key identifier clause type

What is matched


The value of the IssuerName property and the issuer serial number returned from the GetSerialNumber method.


The data returned from the GetRawCertData method.


The subject key identifier extension in the Extensions property is matched.


The thumbprint that is returned by the GetCertHash method.

.NET Framework
Available since 3.0
Return to top