Пример #1
0
            public async Task UpdateAsync()
            {
                LoginConfigData config = await LoginConfigDataProvider.GetConfigAsync();

                RegisterModule regMod = (RegisterModule)await ModuleDefinition.CreateUniqueModuleAsync(typeof(RegisterModule));

                LoginModule loginMod = (LoginModule)await ModuleDefinition.CreateUniqueModuleAsync(typeof(LoginModule));

                bool closeOnLogin;

                Manager.TryGetUrlArg <bool>("CloseOnLogin", out closeOnLogin, false);

                ModuleAction logAction = await loginMod.GetAction_LoginAsync(config.LoginUrl, Force : true, CloseOnLogin : closeOnLogin);

                if (logAction != null)
                {
                    logAction.AddToOriginList = false;
                }
                Actions.New(logAction);
                ModuleAction regAction = await regMod.GetAction_RegisterAsync(config.RegisterUrl, Force : true, CloseOnLogin : closeOnLogin);

                if (regAction != null)
                {
                    regAction.AddToOriginList = false;
                }
                Actions.New(regAction);
            }
Пример #2
0
            }                                     // for external login only

            public async Task UpdateAsync()
            {
                LoginConfigData config = await LoginConfigDataProvider.GetConfigAsync();

                RegisterModule regMod = (RegisterModule)await ModuleDefinition.CreateUniqueModuleAsync(typeof(RegisterModule));

                bool closeOnLogin;

                Manager.TryGetUrlArg <bool>("CloseOnLogin", out closeOnLogin, false);
                ForgotPasswordModule pswdMod = (ForgotPasswordModule)await ModuleDefinition.CreateUniqueModuleAsync(typeof(ForgotPasswordModule));

                ModuleAction pswdAction = await pswdMod.GetAction_ForgotPasswordAsync(config.ForgotPasswordUrl, CloseOnLogin : closeOnLogin);

                if (pswdAction != null)
                {
                    pswdAction.AddToOriginList = false;
                }
                Actions.New(pswdAction);
                ModuleAction registerAction = await regMod.GetAction_RegisterAsync(config.RegisterUrl, Force : true, CloseOnLogin : closeOnLogin);

                if (registerAction != null)
                {
                    registerAction.AddToOriginList = false;
                }
                Actions.New(registerAction);
            }