Show / Hide Table of Contents

Class IdentityRole

Represents a role in the identity system.

Inheritance
Object
IdentityRole<System.Guid>
IdentityRole
MultitenantRole
Inherited Members
Microsoft.AspNetCore.Identity.IdentityRole<System.Guid>.ToString()
IdentityRole<Guid>.Id
IdentityRole<Guid>.Name
IdentityRole<Guid>.NormalizedName
IdentityRole<Guid>.ConcurrencyStamp
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
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()

Creates a new instance of IdentityRole.

Declaration
public 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
IRole.AddForNewUser

BuiltIn

Gets or sets if this role is a system role.

Declaration
public bool BuiltIn { get; set; }
Property Value
Boolean

Implements
IRole.BuiltIn
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
IRole.External

ExternalName

Gets or sets the name of the role in the external source.

Declaration
public string ExternalName { get; set; }
Property Value
String

Implements
IRole.ExternalName

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
IRole.GetClaims(String)

Explicit Interface Implementations

IHaveClaims.GetClaims()

Declaration
IEnumerable<Claim> IHaveClaims.GetClaims()
Returns
IEnumerable<System.Security.Claims.Claim>

Implements
IHaveClaims.GetClaims()
Back to top Generated by DocFX