ValidatingIssuerNameRegistry.GetIssuerName Method (SecurityToken, String)

Returns the name of the security token issuer.

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

Syntax

'Declaration
Public Overridable Function GetIssuerName ( _
    securityToken As SecurityToken, _
    requestedIssuerName As String _
) As String
public virtual string GetIssuerName(
    SecurityToken securityToken,
    string requestedIssuerName
)
public:
virtual String^ GetIssuerName(
    SecurityToken^ securityToken, 
    String^ requestedIssuerName
)
abstract GetIssuerName : 
        securityToken:SecurityToken * 
        requestedIssuerName:string -> string  
override GetIssuerName : 
        securityToken:SecurityToken * 
        requestedIssuerName:string -> string
public function GetIssuerName(
    securityToken : SecurityToken, 
    requestedIssuerName : String
) : String

Parameters

  • requestedIssuerName
    Type: System.String

    The issuer of the token that is being validated.

Return Value

Type: System.String
Returns String.

Remarks

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

A string representation of the signer is created and then the appropriate method is called, either IsSymmetricKeyValid or IsThumbprintValid. The string representation of the signer is created as follows:

  • For a [X509SecurityToken], the thumbprint of the certificate is used.

  • For non [X509SecurityTokens]:

    • Each key in the securityToken is examined to see if it is a symmetric key.

    • A string is created by converting the binary bytes representing the key to a base64Encoded string using [Convert.ToBase64String].

    • Non symmetric keys are ignored.

.NET Framework Security

See Also

Reference

ValidatingIssuerNameRegistry Class

GetIssuerName Overload

System.IdentityModel.Tokens Namespace