You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Security/Identity/IUser.cs

66 lines
1.8 KiB

using Connected.Data;
namespace Connected.Security.Identity;
/// <summary>
/// Specifies the user's status.
/// </summary>
public enum UserStatus
{
/// <summary>
/// User is not active and cannot log into the environment.
/// </summary>
Inactive = 0,
/// <summary>
/// User is a valid user and can log into the environment and
/// use its identity.
/// </summary>
Active = 1,
/// <summary>
/// User is locked out and cannot log into the environment.
/// </summary>
Locked = 2
}
/// <summary>
/// Represents user entity. User is basic artifact of the identity
/// infrastructure.
/// </summary>
/// <remarks>
/// User tipically maps to a person or a physical end user of the
/// environment.
/// </remarks>
public interface IUser : IPrimaryKey<int>
{
/// <summary>
/// The user's first name.
/// </summary>
string? FirstName { get; init; }
/// <summary>
/// The user's last name
/// </summary>
string? LastName { get; init; }
/// <summary>
/// The login name which can be used when authenticating the user.
/// </summary>
string? LoginName { get; init; }
/// <summary>
/// The email associated with the user. The email should be unique
/// across the environment.
/// </summary>
string? Email { get; init; }
/// <summary>
/// Timezone used when representing Date and Time values. UTC timezone
/// is used by default, if this property is not set.
/// </summary>
string? TimeZone { get; init; }
/// <summary>
/// Language used by the user as defined in the <see cref="Globalization.ILanguageService"/>
/// service. If not set, default, environment wide language is used.
/// </summary>
int Language { get; init; }
/// <summary>
/// The status of the user indicating wether user can log into the environment or not.
/// </summary>
UserStatus Status { get; init; }
}