SamlSecurityTokenRequirement.ShouldEnforceAudienceRestriction Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.