public ChallengeModel(User user, U2fRegistration registration) { UserId = user.Id.ToString(); AppId = registration.AppId; Challenge = registration.Challenge; Version = registration.Version; }
public TwoFactorU2fResponseModel(User user, TwoFactorProvider provider, U2fRegistration registration = null) : base("twoFactorU2f") { if (user == null) { throw new ArgumentNullException(nameof(user)); } if (registration != null) { Challenge = new ChallengeModel(user, registration); } Enabled = provider?.Enabled ?? false; }