SamlAudienceRestrictionCondition Class

Specifies that a SAML assertion is addressed to a particular audience.

System.Object
  System.IdentityModel.Tokens.SamlCondition
    System.IdentityModel.Tokens.SamlAudienceRestrictionCondition

Namespace:  System.IdentityModel.Tokens
Assembly:  System.IdentityModel (in System.IdentityModel.dll)

public class SamlAudienceRestrictionCondition : SamlCondition

The SamlAudienceRestrictionCondition type exposes the following members.

  NameDescription
Public methodSamlAudienceRestrictionCondition()Initializes a new instance of the SamlAudienceRestrictionCondition class.
Public methodSamlAudienceRestrictionCondition(IEnumerable<Uri>)Initializes a new instance of the SamlAudienceRestrictionCondition class with the specified set of audiences a SAML assertion is intended for.
Top

  NameDescription
Public propertyAudiencesGets the set of audiences a SAML assertion is intended for.
Public propertyIsReadOnlyGets a value that indicates whether the properties of this instance are read-only. (Overrides SamlCondition.IsReadOnly.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodMakeReadOnlyCauses this instance to be read-only. (Overrides SamlCondition.MakeReadOnly().)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodReadXmlReads the <AudienceRestrictionCondition> element from the specified XML reader. (Overrides SamlCondition.ReadXml(XmlDictionaryReader, SamlSerializer, SecurityTokenSerializer, SecurityTokenResolver).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodWriteXmlWrites the <AudienceRestrictionCondition> element into the specified XML serializer. (Overrides SamlCondition.WriteXml(XmlDictionaryWriter, SamlSerializer, SecurityTokenSerializer).)
Top

The SamlAudienceRestrictionCondition class corresponds to the <saml:AudienceRestrictionCondition> XML element, which is defined in the OASIS SAML 1.1 specification. The SamlAudienceRestrictionCondition is one of several SamlConditions that can be used to scope a SAML assertion

Use the SamlAudienceRestrictionCondition class to specify a SamlAssertion is intended for a specific audience and that the issuing SAML authority does not warrant the SAML assertion for other audiences that receive the security token. The claims for SamlSecurityToken security tokens are expressed as part of a SamlAssertion, which can optionally have a set of conditions affect the validity of the assertion. One of those conditions is a SamlAudienceRestrictionCondition, which specifies that the assertion is addressed to one or more specific audiences. The issuing SAML authority cannot prevent an unintended recipient from taking action on the basis of the information provided in the SAML assertion. However, the SamlAudienceRestrictionCondition class allows the SAML authority to state explicitly that no warranty is provided to such a party in a machine- and human-readable form.

To specify the set of intended audiences, use the SamlAudienceRestrictionCondition(IEnumerable<Uri>) constructor that accepts a set of audiences. To get the set of intended audiences, access the Audiences property.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft