共用方式為


SamlSecurityTokenRequirement.ShouldEnforceAudienceRestriction 方法

定義

傳回值,這個值表示是否應根據此SamlSecurityTokenRequirement 的設定對對象強制 (Audience Enforcement) 進行檢查。

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

適用於