public IHttpActionResult Logout() { logger.Start("[AuthenticationController.Logout] called"); var ctx = Request.GetOwinContext(); ctx.Authentication.SignOut( Constants.PrimaryAuthenticationType, Constants.ExternalAuthenticationType, Constants.PartialSignInAuthenticationType); ClearLoginRequestMessage(); return(new EmbeddedHtmlResult(Request, new LayoutModel { Server = settings.GetSiteName(), Page = "logout" })); }
public IHttpActionResult Logout() { logger.Start("[LogoutController.Logout] called"); return(new EmbeddedHtmlResult( Request, new LayoutModel { Server = settings.GetSiteName(), Page = "logoutprompt", PageModel = new { url = Url.Route(Constants.RouteNames.Logout, null) } })); }
private IHttpActionResult CreateConsentResult( ValidatedAuthorizeRequest validatedRequest, NameValueCollection requestParameters, string errorMessage) { var consentModel = new ConsentModel(validatedRequest, requestParameters); string name = User.GetName(); return(new EmbeddedHtmlResult( Request, new LayoutModel { Server = _settings.GetSiteName(), ErrorMessage = errorMessage, Page = "consent", Username = name, SwitchUrl = Url.Route("switch", null) + "?" + requestParameters.ToQueryString(), PageModel = consentModel })); }