// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. using System; using System.Collections.Generic; namespace Microsoft.AspNetCore.Identity.Test { public class TestUser : TestUser { public TestUser() { Id = Guid.NewGuid().ToString(); } public TestUser(string userName) : this() { UserName = userName; } } public class TestUser where TKey : IEquatable { public TestUser() { } public TestUser(string userName) : this() { UserName = userName; } public virtual TKey Id { get; set; } public virtual string UserName { get; set; } public virtual string NormalizedUserName { get; set; } /// /// Email /// public virtual string Email { get; set; } public virtual string NormalizedEmail { get; set; } /// /// True if the email is confirmed, default is false /// public virtual bool EmailConfirmed { get; set; } /// /// The salted/hashed form of the user password /// public virtual string PasswordHash { get; set; } /// /// A random value that should change whenever a users credentials change (password changed, login removed) /// public virtual string SecurityStamp { get; set; } /// /// A random value that should change whenever a user is persisted to the store /// public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString(); /// /// PhoneNumber for the user /// public virtual string PhoneNumber { get; set; } /// /// True if the phone number is confirmed, default is false /// public virtual bool PhoneNumberConfirmed { get; set; } /// /// Is two factor enabled for the user /// public virtual bool TwoFactorEnabled { get; set; } /// /// DateTime in UTC when lockout ends, any time in the past is considered not locked out. /// public virtual DateTimeOffset? LockoutEnd { get; set; } /// /// Is lockout enabled for this user /// public virtual bool LockoutEnabled { get; set; } /// /// Used to record failures for the purposes of lockout /// public virtual int AccessFailedCount { get; set; } public virtual ICollection> Roles { get; private set; } = new List>(); public virtual ICollection> Claims { get; private set; } = new List>(); public virtual ICollection> Logins { get; private set; } = new List>(); public virtual ICollection> Tokens { get; private set; } = new List>(); } }