Esempio n. 1
0
        private void AddAuthenticatorsToViewModel(PaymentDigitalSignatureViewModel model, User user)
        {
            var authenticators = _authContext.FidoLogins.Where(x => x.UserId == user.Id);

            if (authenticators.Any())
            {
                model.Fido2Registered = true;
            }

            model.SmartCardRegistered = true;
            //    model.AuthenticatorTypes = model.AuthenticatorTypes.Distinct().ToList();
        }
Esempio n. 2
0
        protected PaymentDigitalSignatureViewModel BuildPaymentDigitalSignatureViewModel(string paymentId)
        {
            var payment = _authContext.Payments.FirstOrDefault(x => x.Id == paymentId);

            if (payment == null)
            {
                return(null);
            }
            var vm = new PaymentDigitalSignatureViewModel()
            {
                UserId          = payment.UserId,
                PaymentId       = payment.Id,
                Amount          = payment.Amount,
                CreditorAccount = payment.CreditorAccount,
                DebtorAccount   = payment.DebtorAccount,
                CreditorName    = payment.CreditorName,
                DebtorName      = payment.DebtorName
            };

            return(vm);
        }