Skip to content
Snippets Groups Projects

Fix: Route for logging user out

Merged Sirieam Marie Hunke requested to merge Issue/1974-shibbolethLogout into dev
2 files
+ 2
11
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -38,9 +38,6 @@ namespace Coscine.Api.STS.Controllers
[Route("[controller]/logout")]
public async Task<ActionResult> Logout()
{
var externalLoginInfo = await _signInManager.GetExternalLoginInfoAsync();
var loggedInWithShibboleth = (externalLoginInfo != null && externalLoginInfo.LoginProvider == "Saml2");
await _signInManager.SignOutAsync();
foreach (var cookie in Request.Cookies.Keys)
@@ -53,12 +50,7 @@ namespace Coscine.Api.STS.Controllers
ViewBag.LoginUrl = UrlGenerator.GetLoginUrl(Request) + "?logout=true";
if (loggedInWithShibboleth)
{
ViewBag.LoginUrl += "&loggedInWithShibboleth=true";
}
return Redirect(ViewBag.LoginUrl);
}
}
}
}
\ No newline at end of file
Loading