Class User
Namespace: Identity.Domain.Aggregates.UserAggregate
Assembly: Identity.Domain.dll
User class that define authentication users, this entity is the identity one.
Inheritance
object ← Entity ← User
Implements
Inherited Members
Entity.Id, Entity.CreatedAt, Entity.UpdatedAt, Entity.DomainEvents, Entity.EmitDomainEvent\(IDomainEvent\), object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.MemberwiseClone\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)
Properties
Color
The color of the User
Property Value
The email address of the User.
Property Value
Firstname
The unique username of the User.
Property Value
Lastname
The unique username of the User.
Property Value
PasswordHash
The hashed password of the User.
Property Value
PasswordResetToken
The password reset token for the User.
Property Value
PasswordResetTokenExpiryDate
The time when the password reset token was issued.
Property Value
RestaurantId
The restaurant id that the Identity.Domain.Aggregates.UserAggregate.User owner or staff affiliated with.
Property Value
Guid?
Role
The role of the User.
Property Value
RoleId
The id of the user role.
Property Value
SortingIndex
Position of the Identity.Domain.Aggregates.UserAggregate.User in the view.
Property Value
Username
The unique username of the User.
Property Value
Methods
ChangePassword\(string\)
Method that change the password of the User.
Parameters
hashedPassword string
New hashed password.
ClearResetToken\(\)
Wipe reset token after use.
GeneratePasswordResetToken\(int, int\)
Method that generates a password reset token and assigns it to the user.
Parameters
tokenLength int
Length of the reset token.
expiryTimeInMinutes int
Token expiration time in minutes.
IsEmployee\(\)
Whether the user is an restaurant employee.
Returns
IsPasswordResetTokenValid\(string\)
Method that verify token validity.
Parameters
token string
The token to verify.
Returns
Boolean that signify validity.
UpdateBasicInformation\(string, string, string, string, long\)
Update basic information of the Identity.Domain.Aggregates.UserAggregate.User.
Parameters
username string
Identity.Domain.Aggregates.UserAggregate.User.Username of the Identity.Domain.Aggregates.UserAggregate.User.
firstname string
Identity.Domain.Aggregates.UserAggregate.User.Firstname of the Identity.Domain.Aggregates.UserAggregate.User.
lastname string
Identity.Domain.Aggregates.UserAggregate.User.Lastname of the Identity.Domain.Aggregates.UserAggregate.User.
email string
Identity.Domain.Aggregates.UserAggregate.User.Email of the Identity.Domain.Aggregates.UserAggregate.User.
color long
Identity.Domain.Aggregates.UserAggregate.User.Color of the Identity.Domain.Aggregates.UserAggregate.User.
UpdateSortingIndex\(int\)
Update the position of the Identity.Domain.Aggregates.UserAggregate.User in the view.
Parameters
newSortingIndex int
New position.