Επεξεργασία

Κοινή χρήση μέσω


ClaimsIdentity.Claims Property

Definition

Gets the claims associated with this claims identity.

public:
 virtual property System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ Claims { System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ get(); };
public virtual System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> Claims { get; }
member this.Claims : seq<System.Security.Claims.Claim>
Public Overridable ReadOnly Property Claims As IEnumerable(Of Claim)

Property Value

The collection of claims associated with this claims identity.

Remarks

The collection may contain entries that are null.

The claims contained in the Claims collection essentially describe the entity that is represented by the ClaimsIdentity. The claims describe the properties and rights possessed by the entity and can be examined by applications to make decisions about authentication and authorization.

Note

The ClaimsPrincipal class has a Claims property as well. In the majority of cases you should access the user's claims through the ClaimsPrincipal.Claims collection rather than through the Claims collection. You will need to access the claims of an individual ClaimsIdentity only in the cases where the principal contains more than one ClaimsIdentity and you need to evaluate or modify a specific identity.

Applies to

See also