Пример #1
0
 /// <summary>
 /// Получить вход в систему.
 /// </summary>
 /// <param name="input">Ввод.</param>
 /// <returns>Задача с выводом.</returns>
 public Task <ModIdentityServerWebMvcPartAccountCommonJobLoginOutput> GetLogin(
     ModIdentityServerWebMvcPartAccountJobLoginGetInput input
     )
 {
     return(ProduceLogin(
                input.ReturnUrl,
                ModIdentityServerBaseEnumLoginMethods.Windows,
                input.Interaction,
                input.SchemeProvider,
                input.СlientStore
                ));
 }
Пример #2
0
            ) BuildActionLoginGet(ModIdentityServerWebMvcPartAccountJobLoginGetInput input)
        {
            input.СlientStore    = ExtClientStore;
            input.Interaction    = ExtInteraction;
            input.SchemeProvider = ExtSchemeProvider;

            var job = AppJobLoginGet;

            Task <ModIdentityServerWebMvcPartAccountCommonJobLoginOutput> execute() => job.Execute(input);

            void onSuccess(ModIdentityServerWebMvcPartAccountCommonJobLoginResult result)
            {
                job.OnSuccess(ExtLogger, result, input);
            }

            void onError(Exception ex, ModIdentityServerWebMvcPartAccountCommonJobLoginResult result)
            {
                job.OnError(ex, ExtLogger, result);
            }

            return(execute, onSuccess, onError);
        }
Пример #3
0
        public async Task <IActionResult> LoginGet(string returnUrl)
        {
            var result = new ModIdentityServerWebMvcPartAccountCommonJobLoginResult();

            var input = new ModIdentityServerWebMvcPartAccountJobLoginGetInput
            {
                ReturnUrl = returnUrl
            };

            var(execute, onSuccess, onError) = MyModel.BuildActionLoginGet(input);

            try
            {
                result.Data = await execute().CoreBaseExtTaskWithCurrentCulture(false);

                onSuccess(result);
            }
            catch (Exception ex)
            {
                onError(ex, result);
            }

            return(View("~/Views/Account/Login.cshtml", result.Data));
        }