ClaimsIdentity.Claims Property
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.
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)
The collection of claims associated with this claims identity.
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.
Märkus
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.
Toode | Versioonid |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
UWP | 10.0 |
Toote „.NET“ tagasiside
.NET on avatud lähtekoodiga projekt. Tagasiside andmiseks valige link: