Export (0) Print
Expand All

ClaimsPrincipal.Claims Property

.NET Framework 4.5

Gets a collection that contains all of the claims from all of the claims identities associated with this claims principal.

Namespace:  System.Security.Claims
Assembly:  mscorlib (in mscorlib.dll)

public virtual IEnumerable<Claim> Claims { get; }

Property Value

Type: System.Collections.Generic.IEnumerable<Claim>
The claims associated with this principal.

A claims principal has a collection of ClaimsIdentity objects that is accessible through the Identities property. Each ClaimsIdentity in the collection contains one or more claims. The Claims property returns all of the claims from all of the claims identities in this collection.

The Claims property can be examined by custom implementations of the ClaimsAuthenticationManager class to make authentication decisions or to filter, transform, or enrich an incoming claim set; by custom implementations of the ClaimsAuthorizationManager class to enforce authorization policy; or by application code to make authorization decisions or to customize user experience based on the claims present in the collection.

.NET Framework

Supported in: 4.5

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.

Show:
© 2014 Microsoft