ClaimsPrincipal::IsInRole Method (String^)
.NET Framework (current version)
Returns a value that indicates whether the entity (user) represented by this claims principal is in the specified role.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- role
-
Type:
System::String^
The role for which to check.
Return Value
Type: System::Booleantrue if claims principal is in the specified role; otherwise, false.
Implements
IPrincipal::IsInRole(String^)The IsInRole method checks whether an identity that this claims principal possesses contains a claim of type ClaimsIdentity::RoleClaimType where the value of the claim is equal to the value specified by the role parameter.
Note |
|---|
Each ClaimsIdentity has its own definition of the claim type that represents a role. This claim type can be accessed and set through the ClaimsIdentity::RoleClaimType property. |
Universal Windows Platform
Available since 10
.NET Framework
Available since 4.5
Available since 10
.NET Framework
Available since 4.5
Show:
.jpeg?cs-save-lang=1&cs-lang=cpp)