private async Task<IHttpActionResult> RenderLoggedOutPage(string id)
        {
            Logger.Info("rendering logged out page");

            var baseUrl = context.GetIdentityServerBaseUrl();
            var iframeUrls = options.RenderProtocolUrls(baseUrl);

            var message = signOutMessageCookie.Read(id);
            var redirectUrl = message != null ? message.ReturnUrl : null;
            var clientName = await clientStore.GetClientName(message);
            
            var loggedOutModel = new LoggedOutViewModel
            {
                SiteName = options.SiteName,
                SiteUrl = baseUrl,
                IFrameUrls = iframeUrls,
                ClientName = clientName,
                RedirectUrl = redirectUrl
            };
            return new LoggedOutActionResult(viewService, loggedOutModel);
        }
 /// <summary>
 /// Loads the HTML for the logged out page informing the user that they have successfully logged out.
 /// </summary>
 /// <param name="model">The model.</param>
 /// <returns>
 /// Stream for the HTML
 /// </returns>
 public virtual Task<Stream> LoggedOut(LoggedOutViewModel model)
 {
     return Render(model, "loggedOut");
 }
        private async Task<IHttpActionResult> RenderLoggedOutPage(string id)
        {
            Logger.Info("rendering logged out page");

            var env = Request.GetOwinEnvironment();
            var baseUrl = env.GetIdentityServerBaseUrl();
            var urls = new List<string>();

            foreach (var url in _options.ProtocolLogoutUrls)
            {
                var tmp = url;
                if (tmp.StartsWith("/")) tmp = tmp.Substring(1);
                urls.Add(baseUrl + tmp);
            }

            var message = GetSignOutMessage(id);
            var redirectUrl = message != null ? message.ReturnUrl : null;
            var clientName = await GetClientNameFromSignOutMessage(message);
            ClearSignOutMessage();

            var loggedOutModel = new LoggedOutViewModel
            {
                SiteName = _options.SiteName,
                SiteUrl = baseUrl,
                IFrameUrls = urls,
                ClientName = clientName,
                RedirectUrl = redirectUrl
            };
            return new LoggedOutActionResult(_viewService, loggedOutModel);
        }
 public LoggedOutActionResult(IViewService viewSvc, LoggedOutViewModel model)
     : base(async () => await viewSvc.LoggedOut(model))
 {
     if (viewSvc == null) throw new ArgumentNullException("viewSvc");
     if (model == null) throw new ArgumentNullException("model");
 }