Skip to content
Snippets Groups Projects
Commit 295af4ce authored by Sirieam Marie Hunke's avatar Sirieam Marie Hunke
Browse files

Fix: Shibboleth route

parent 8baf8eb1
No related branches found
No related tags found
1 merge request!136Fix: Route for logging user out
......@@ -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
......@@ -45,7 +45,6 @@ namespace Coscine.Api.STS.Utils
if (!retString.Contains("?"))
{
retString += "?";
}
else
{
......@@ -71,4 +70,4 @@ namespace Coscine.Api.STS.Utils
return Program.MainUrl + "/merge/callback?returnUrl=" + Program.MainUrl;
}
}
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment