Bewerken

Share via


SamlSecurityTokenRequirement.ShouldEnforceAudienceRestriction Method

Definition

Returns a value that indicates whether Audience Enforcement checks are required for the specified token based on the settings of this 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

Parameters

audienceUriMode
AudienceUriMode

One of the enumeration values that defines the audience requirement.

token
SecurityToken

The security token to be tested for Audience Enforcement.

Returns

true if Audience Enforcement should be applied; otherwise, false.

Exceptions

token is null.

Applies to