SamlSecurityTokenRequirement.ShouldEnforceAudienceRestriction 方法

定义

返回指示观众执行检查是否对基于该 SamlSecurityTokenRequirement设置的指定标记是必需的的值。

public:
 virtual bool ShouldEnforceAudienceRestriction(System::IdentityModel::Selectors::AudienceUriMode audienceUriMode, System::IdentityModel::Tokens::SecurityToken ^ token);
public virtual bool ShouldEnforceAudienceRestriction (System.IdentityModel.Selectors.AudienceUriMode audienceUriMode, System.IdentityModel.Tokens.SecurityToken token);
abstract member ShouldEnforceAudienceRestriction : System.IdentityModel.Selectors.AudienceUriMode * System.IdentityModel.Tokens.SecurityToken -> bool
override this.ShouldEnforceAudienceRestriction : System.IdentityModel.Selectors.AudienceUriMode * System.IdentityModel.Tokens.SecurityToken -> bool
Public Overridable Function ShouldEnforceAudienceRestriction (audienceUriMode As AudienceUriMode, token As SecurityToken) As Boolean

参数

audienceUriMode
AudienceUriMode

用来定义观众要求枚举值之一。

token
SecurityToken

要测试的用于“观众强化”的安全令牌。

返回

如果应该应用 Audience Enforcement,则为 true;否则为 false

例外

tokennull

适用于