Class ClaimsPrincipalExtensions
Extension methods for System.Security.Claims.ClaimsPrincipal.
Inherited Members
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public static class ClaimsPrincipalExtensions
Methods
AddActClaim(ClaimsIdentity, ClaimsPrincipal, String[])
Creates an act claim from
and adds it to identity
.
Declaration
public static void AddActClaim(this ClaimsIdentity identity, ClaimsPrincipal from, params string[] claimTypesToInclude)
Parameters
System.Security.Claims.ClaimsIdentity
identity
The System.Security.Claims.ClaimsIdentity to add the act claim to. |
System.Security.Claims.ClaimsPrincipal
from
The user to create a act claim for. |
String[]
claimTypesToInclude
The types of claims to include in the act claim. |
CreateActClaim(ClaimsPrincipal, String[])
Creates a System.Security.Claims.Claim of type Actor with information from the principal
.
Declaration
public static Claim CreateActClaim(this ClaimsPrincipal principal, params string[] claimTypesToInclude)
Parameters
System.Security.Claims.ClaimsPrincipal
principal
The user to create a act claim for. |
String[]
claimTypesToInclude
The types of claims to include in the act claim. |
Returns
System.Security.Claims.Claim
A System.Security.Claims.Claim of type Actor. |
HasVerifiedEmail(ClaimsPrincipal)
Gets if the principal
has a verified email or not.
Declaration
public static bool HasVerifiedEmail(this ClaimsPrincipal principal)
Parameters
System.Security.Claims.ClaimsPrincipal
principal
The System.Security.Claims.ClaimsPrincipal to check. |
Returns
Boolean
true if the |
HasVerifiedPhoneNumber(ClaimsPrincipal)
Gets if the principal
has a verified phone number or not.
Declaration
public static bool HasVerifiedPhoneNumber(this ClaimsPrincipal principal)
Parameters
System.Security.Claims.ClaimsPrincipal
principal
The System.Security.Claims.ClaimsPrincipal to check. |
Returns
Boolean
true if the |