ValidatingIssuerNameRegistry.IsSymmetricKeyValid Method

This method can be called as part of a security token validating sequence where it is necessary to validate that the signer of a security token and the issuer of a security token are as expected.

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

Syntax

'Declaration
Protected Overridable Function IsSymmetricKeyValid ( _
    base64EncodedKey As String, _
    issuer As String _
) As Boolean
protected virtual bool IsSymmetricKeyValid(
    string base64EncodedKey,
    string issuer
)
protected:
virtual bool IsSymmetricKeyValid(
    String^ base64EncodedKey, 
    String^ issuer
)
abstract IsSymmetricKeyValid : 
        base64EncodedKey:string * 
        issuer:string -> bool  
override IsSymmetricKeyValid : 
        base64EncodedKey:string * 
        issuer:string -> bool
protected function IsSymmetricKeyValid(
    base64EncodedKey : String, 
    issuer : String
) : boolean

Parameters

Return Value

Type: System.Boolean
Returns true if the pair is valid, false otherwise.

Remarks

Any IssuingAuthority in IssuingAuthorities that contains both the base64EncodedKey in SymmetricKeys and issuer in Issuers will be considered a valid pair.

This method returns when the first valid pair is found.

Warning

If you choose to override this method please be aware of the need to use the appropriate case when comparing keys. Symmetric keys are case sensitive. Comparing keys as case insensitive could lead to security issues.

.NET Framework Security

See Also

Reference

ValidatingIssuerNameRegistry Class

System.IdentityModel.Tokens Namespace