SecurityTokenAuthenticator.ValidateTokenCore(SecurityToken) 方法

定义

在派生类中重写时,对指定的安全令牌进行身份验证,并返回该安全令牌的授权策略集。When overridden in a derived class, authenticates the specified security token and returns the set of authorization policies for the security token.

protected:
 abstract System::Collections::ObjectModel::ReadOnlyCollection<System::IdentityModel::Policy::IAuthorizationPolicy ^> ^ ValidateTokenCore(System::IdentityModel::Tokens::SecurityToken ^ token);
protected abstract System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy> ValidateTokenCore (System.IdentityModel.Tokens.SecurityToken token);
abstract member ValidateTokenCore : System.IdentityModel.Tokens.SecurityToken -> System.Collections.ObjectModel.ReadOnlyCollection<System.IdentityModel.Policy.IAuthorizationPolicy>
Protected MustOverride Function ValidateTokenCore (token As SecurityToken) As ReadOnlyCollection(Of IAuthorizationPolicy)

参数

token
SecurityToken

要验证的 SecurityTokenThe SecurityToken to be validated.

返回

ReadOnlyCollection<IAuthorizationPolicy>

一个类型为 ReadOnlyCollection<T>IAuthorizationPolicy,它包含对此应用程序生效的授权策略集。A ReadOnlyCollection<T> of type IAuthorizationPolicy that contains the set of authorization policies in effect for this application.

注解

重写 ValidateTokenCore 方法,以便对特定安全令牌类型进行身份验证。Override the ValidateTokenCore method to authenticate a specific security token type.

重写 ValidateTokenCore 方法时,请遵循下列准则:When the ValidateTokenCore method is overridden, follow these guidelines:

此方法返回时 null ,Windows Communication Foundation 引发 SecurityTokenValidationException 异常。When this method returns null, Windows Communication Foundation throws a SecurityTokenValidationException exception.

ValidateTokenCore 方法由 ValidateToken 方法调用。The ValidateTokenCore method is called by the ValidateToken method.

适用于