/// <summary>
        /// SetNotification method implementation
        /// </summary>
        public Notification SetNotification(Registration reg, MFAConfig cfg, int otp)
        {
            Notification notif = new Notification();

            notif.ID             = reg.ID;
            notif.RegistrationID = reg.ID;
            notif.OTP            = otp;
            notif.CreationDate   = DateTime.UtcNow;
            notif.ValidityDate   = notif.CreationDate.AddSeconds(_deliverywindow);
            notif.CheckDate      = null;
            DoUpdateNotification(notif);
            return(notif);
        }
 /// <summary>
 /// GetAdministrativeProvider method implementation
 /// </summary>
 public static IExternalAdminProvider GetAdministrativeProvider(MFAConfig cfg)
 {
     return(RuntimeAuthProvider.GetAdministrativeProvider(cfg));
 }
 /// <summary>
 /// GetUserProperties method implmentation
 /// </summary>
 public static MFAUser GetUserProperties(MFAConfig cfg, string upn)
 {
     return(RuntimeRepository.GetMFAUser(cfg, upn));
 }
 /// <summary>
 /// CanChangePassword method implmentation
 /// </summary>
 public static bool CanChangePassword(MFAConfig cfg, AuthenticationContext usercontext)
 {
     return(RuntimeRepository.CanChangePassword(cfg, usercontext));
 }
 /// <summary>
 /// MustChangePasswordSoon method implementation
 /// </summary>
 public static bool MustChangePasswordSoon(MFAConfig cfg, AuthenticationContext usercontext, out DateTime max)
 {
     return(RuntimeRepository.MustChangePasswordSoon(cfg, usercontext, out max));
 }