protected override void RemoveTwoFactorAuthToken(TwoFactorAuthToken item) { var removed = this.TwoFactorAuthTokensCollection.SingleOrDefault( x => x.Token == item.Token && x.Issued == item.Issued); this.TwoFactorAuthTokensCollection.Remove(removed); }
protected override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { var twoFactorAuthToken = new NhTwoFactorAuthToken(); twoFactorAuthToken.GetType().GetProperty("Issued").SetValue(twoFactorAuthToken, item.Issued); twoFactorAuthToken.GetType().GetProperty("Token").SetValue(twoFactorAuthToken, item.Token); twoFactorAuthToken.GetType().GetProperty("Account").SetValue(twoFactorAuthToken, this); this.TwoFactorAuthTokensCollection.Add(twoFactorAuthToken); }
public LoginView(bool twoFactor) { _ViewModel = new LoginViewModel(this, twoFactor); DataContext = _ViewModel; InitializeComponent(); if (string.IsNullOrEmpty(_ViewModel.Model.Password)) { PasswordBox.Focus(); } else { PasswordBox.Password = _ViewModel.Model.Password; TwoFactorAuthToken.Focus(); } }
protected internal override void RemoveTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Remove((TTwoFactorAuthToken)item); }
protected internal override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Add(new TTwoFactorAuthToken { ParentKey = this.Key, Token = item.Token, Issued = item.Issued }); }
protected internal override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Add(item); }
protected internal override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Add(new RelationalTwoFactorAuthToken { UserAccountID = this.ID, Token = item.Token, Issued = item.Issued }); }
protected internal override void RemoveTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Remove(item); }
protected internal override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Add(item); }
protected internal override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Add(new RelationalTwoFactorAuthToken { UserAccountID = this.ID, Token = item.Token, Issued = item.Issued }); }
protected override void RemoveTwoFactorAuthToken(TwoFactorAuthToken item) { var removed = this.TwoFactorAuthTokensCollection.SingleOrDefault( x => x.Token == item.Token && x.Issued == item.Issued); this.TwoFactorAuthTokensCollection.Remove(removed); }
protected override void AddTwoFactorAuthToken(TwoFactorAuthToken item) { var twoFactorAuthToken = new NhTwoFactorAuthToken(); twoFactorAuthToken.GetType().GetProperty("Issued").SetValue(twoFactorAuthToken, item.Issued); twoFactorAuthToken.GetType().GetProperty("Token").SetValue(twoFactorAuthToken, item.Token); twoFactorAuthToken.GetType().GetProperty("Account").SetValue(twoFactorAuthToken, this); this.TwoFactorAuthTokensCollection.Add(twoFactorAuthToken); }
public void RemoveTwoFactorAuthToken(TwoFactorAuthToken item) { TwoFactorAuthTokenCollection.Remove(item); }
//public IEnumerable<TwoFactorAuthToken> TwoFactorAuthTokens //{ // get { return TwoFactorAuthTokenCollection ?? new List<TwoFactorAuthToken>(); } //} public void AddTwoFactorAuthToken(TwoFactorAuthToken item) { item.UserId = UserId; TwoFactorAuthTokenCollection.Add(item); }