SecurityTokenResolver.ResolveToken Method (SecurityKeyIdentifierClause)


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

Retrieves the security token that matches the specified key identifier clause.

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

public SecurityToken ResolveToken(
	SecurityKeyIdentifierClause keyIdentifierClause


Type: System.IdentityModel.Tokens.SecurityKeyIdentifierClause

The SecurityKeyIdentifierClause to create a security token for.

Return Value

Type: System.IdentityModel.Tokens.SecurityToken

A SecurityToken that represents the specified key identifier clause.

The TryResolveToken and ResolveToken methods differ in what happens when the key identifier clause cannot be resolved to a security token. The TryResolveToken method returns false, whereas the ResolveToken method throws an exception.

.NET Framework
Available since 3.0
Return to top