Interface IUser
Represents a user.
Namespace: DataWeb.Identity
Assembly: DataWeb.Core.dll
Syntax
public interface IUser
Properties
Claims
Gets or sets the user's claims.
Declaration
IEnumerable<Claim> Claims { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<Claim> |
Culture
Gets or sets the user's culture.
Declaration
string Culture { get; set; }
Property Value
Type | Description |
---|---|
string |
Gets or sets the user's email address.
Declaration
string Email { get; set; }
Property Value
Type | Description |
---|---|
string |
IdMaster
Gets or sets the Id of the user's master account.
Declaration
string IdMaster { get; set; }
Property Value
Type | Description |
---|---|
string |
Identity
Gets or sets the user's identity.
Declaration
ClaimsIdentity Identity { get; set; }
Property Value
Type | Description |
---|---|
ClaimsIdentity |
IsAuthenticated
Gets or sets a value indicating whether the user is authenticated.
Declaration
bool IsAuthenticated { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsDataWeb
Gets or sets a value indicating whether the user is a web data user.
Declaration
bool IsDataWeb { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsEditable
Gets or sets a value indicating whether the user is editable.
Declaration
bool IsEditable { get; set; }
Property Value
Type | Description |
---|---|
bool |
PublishMode
Gets or sets the publish mode of the user.
Declaration
PublishMode PublishMode { get; set; }
Property Value
Type | Description |
---|---|
PublishMode |
Roles
Gets or sets the user's roles.
Declaration
List<string> Roles { get; set; }
Property Value
Type | Description |
---|---|
List<string> |
UserName
Gets or sets the user name.
Declaration
string UserName { get; set; }
Property Value
Type | Description |
---|---|
string |
Methods
InitAsync(IIdentity)
Initializes the user asynchronously with the specified identity.
Declaration
Task InitAsync(IIdentity identity)
Parameters
Type | Name | Description |
---|---|---|
IIdentity | identity | The identity of the user. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous operation. |
IsInRole(string)
Determines whether the user is in the specified role.
Declaration
bool IsInRole(string roleName)
Parameters
Type | Name | Description |
---|---|---|
string | roleName | The name of the role to check. |
Returns
Type | Description |
---|---|
bool | True if the user is in the specified role; otherwise, false. |