|
|
|
@ -124,7 +124,7 @@ namespace isn.Controllers
|
|
|
|
|
public async Task<IActionResult> Logout(string logoutId)
|
|
|
|
|
{
|
|
|
|
|
// build a model so the logout page knows what to display
|
|
|
|
|
var vm = await BuildLogoutViewModelAsync(logoutId);
|
|
|
|
|
var vm = BuildLogoutViewModel(logoutId);
|
|
|
|
|
|
|
|
|
|
if (vm.ShowLogoutPrompt == false)
|
|
|
|
|
{
|
|
|
|
@ -144,7 +144,7 @@ namespace isn.Controllers
|
|
|
|
|
public async Task<IActionResult> Logout(LogoutInputModel model)
|
|
|
|
|
{
|
|
|
|
|
// build a model so the logged out page knows what to display
|
|
|
|
|
var vm = await BuildLoggedOutViewModelAsync(model.LogoutId);
|
|
|
|
|
var vm = BuildLoggedOutViewModel(model.LogoutId);
|
|
|
|
|
|
|
|
|
|
if (User?.Identity.IsAuthenticated == true)
|
|
|
|
|
{
|
|
|
|
@ -211,7 +211,7 @@ namespace isn.Controllers
|
|
|
|
|
return vm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task<LogoutViewModel> BuildLogoutViewModelAsync(string logoutId)
|
|
|
|
|
private LogoutViewModel BuildLogoutViewModel(string logoutId)
|
|
|
|
|
{
|
|
|
|
|
var vm = new LogoutViewModel { LogoutId = logoutId, ShowLogoutPrompt = AccountOptions.ShowLogoutPrompt };
|
|
|
|
|
|
|
|
|
@ -227,15 +227,13 @@ namespace isn.Controllers
|
|
|
|
|
return vm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private async Task<LoggedOutViewModel> BuildLoggedOutViewModelAsync(string logoutId)
|
|
|
|
|
private LoggedOutViewModel BuildLoggedOutViewModel(string logoutId)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var vm = new LoggedOutViewModel
|
|
|
|
|
{
|
|
|
|
|
AutomaticRedirectAfterSignOut = AccountOptions.AutomaticRedirectAfterSignOut,
|
|
|
|
|
LogoutId = logoutId
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return vm;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|