Interface IRole
Represents a role.
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public interface IRole
Properties
AddForNewUser
Gets or sets if the role should be automatically added for new users.
Declaration
bool AddForNewUser { get; set; }
Property Value
Boolean
|
BuiltIn
Gets or sets if this role is a system role.
Declaration
bool BuiltIn { get; set; }
Property Value
Boolean
|
Remarks
A system role can't be deleted and must contain at least one user.
External
Gets or sets if this role represents an external role (from Active Directory or other source).
Declaration
bool External { get; set; }
Property Value
Boolean
|
ExternalName
Gets or sets the name of the role in the external source.
Declaration
string ExternalName { get; set; }
Property Value
String
|
Id
Gets the identity of the role.
Declaration
Guid Id { get; set; }
Property Value
System.Guid
|
Name
Methods
GetClaims(String)
Gets a collection of claims for this role.
Declaration
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. |