コード例 #1
0
        public bool VerifyPinForMultiFactor(VerifyPinRequest request)
        {
            var process = GetMutiFactorProcess(request.ProcessToken);

            Context.ThrowIfNull(process, ClientFaultCodes.ObjectNotFound, "Process", "Process not found or expired.");
            Context.ThrowIfEmpty(request.Pin, ClientFaultCodes.ValueMissing, "Pin", "Pin value missing.");
            return(_processService.SubmitPin(process, request.Pin));
        }
コード例 #2
0
        public void VerifyPin(VerifyPinRequest request)
        {
            var session = Context.OpenSession();
            var process = GetActiveProcess(session, request.ProcessToken, confirmedOnly: false);

            Context.ThrowIfEmpty(request.Pin, ClientFaultCodes.ValueMissing, "pin", "Pin value missing");
            if (process != null)
            {
                _processService.SubmitPin(process, request.Pin);
            }
        }
コード例 #3
0
ファイル: LoginController.cs プロジェクト: radtek/vita
        public bool VerifyPinForMultiFactor(VerifyPinRequest request)
        {
            var session = Context.OpenSession();
            var process = GetMutiFactorProcess(session, request.ProcessToken);

            Context.ThrowIfNull(process, ClientFaultCodes.ObjectNotFound, "Process", "Process not found or expired.");
            Context.ThrowIfEmpty(request.Pin, ClientFaultCodes.ValueMissing, "Pin", "Pin value missing.");
            var result = _processService.SubmitPin(process, request.Pin);

            session.SaveChanges();
            return(result);
        }