Exemplo n.º 1
0
 public AuthenticatorCategory GetAuthenticatorCategory(IAuthenticatorInfo info)
 {
     return(CategoryBindings.First(b => b.AuthenticatorSecret == info.Secret && b.CategoryId == CategoryId));
 }
Exemplo n.º 2
0
        private static int GetTotpRemainingProgress(IAuthenticatorInfo auth)
        {
            var secondsRemaining = (auth.TimeRenew - DateTime.Now).TotalSeconds;

            return((int)Math.Ceiling(100d * secondsRemaining / auth.Period));
        }
Exemplo n.º 3
0
 private Authenticator GetAuthenticator(IAuthenticatorInfo info)
 {
     return(_all.Find(i => i.Secret == info.Secret));
 }