public async Task <ActionResult> Need2FADisplay() { if (!Manager.Need2FA) { return(new EmptyResult()); } if (Manager.EditMode) { return(new EmptyResult()); } if (Manager.IsInPopup) { return(new EmptyResult()); } SelectTwoStepSetupModule mod2FA = (SelectTwoStepSetupModule)await ModuleDefinition.LoadAsync(ModuleDefinition.GetPermanentGuid(typeof(SelectTwoStepSetupModule))); if (mod2FA == null) { throw new InternalError("Two-step authentication setup module not found"); } ModuleAction action2FA = await mod2FA.GetAction_SelectTwoStepSetupAsync(null); if (action2FA == null) { throw new InternalError("Two-step authentication setup action not found"); } DisplayModel model = new DisplayModel { SetupAction = action2FA, }; return(View(model)); }
public async Task <ModuleAction> GetForceTwoStepActionSetupAsync(string url) { SelectTwoStepSetupModule mod = new SelectTwoStepSetupModule(); return(await mod.GetAction_ForceTwoStepSetupAsync(url)); }