Class IdentityRole
Represents a role in the identity system.
Inherited Members
Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.EntityFrameworkCore.dll
Syntax
public class IdentityRole : IdentityRole<Guid>, IRole, IHaveClaims
Constructors
IdentityRole()
Properties
AddForNewUser
Gets or sets if the role should be automatically added for new users.
Declaration
public bool AddForNewUser { get; set; }
Property Value
Boolean
|
Implements
BuiltIn
Gets or sets if this role is a system role.
Declaration
public bool BuiltIn { get; set; }
Property Value
Boolean
|
Implements
Remarks
A system role can't be deleted and must contain at least one user.
Claims
Navigation property for the claims this role possesses.
Declaration
public virtual ICollection<IdentityRoleClaim<Guid>> Claims { get; }
Property Value
System.Collections.Generic.ICollection<Microsoft.AspNetCore.Identity.IdentityRoleClaim<System.Guid>>
|
External
Gets or sets if this role represents an external role (from Active Directory or other source).
Declaration
public bool External { get; set; }
Property Value
Boolean
|
Implements
ExternalName
Gets or sets the name of the role in the external source.
Declaration
public string ExternalName { get; set; }
Property Value
String
|
Implements
Methods
GetClaims(String)
Gets a collection of claims for this role.
Declaration
public IEnumerable<Claim> GetClaims(string roleClaimType = "role")
Parameters
String
roleClaimType
The ClaimType used for the role claim. |
Returns
IEnumerable<System.Security.Claims.Claim>
A collection of claims. |
Implements
Explicit Interface Implementations
IHaveClaims.GetClaims()
Declaration
IEnumerable<Claim> IHaveClaims.GetClaims()
Returns
IEnumerable<System.Security.Claims.Claim>
|