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
securityToken
Type: System.IdentityModel.Tokens.SecurityTokenThe [SecurityToken] that is being validated.
requestedIssuerName
Type: System.StringThe 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.