public IActionResult Index() { ViewData["EditMyProfileUri"] = Configuration.EditMyProfileUri(); ViewData[OpenIdConnectConstants.AccessToken] = HttpContext.GetTokenAsync(OpenIdConnectConstants.AccessToken).Result; ViewData["Origin"] = $"{Request.Scheme}://{Request.Host.Value}"; var authorizationRequest = OpenIdConnectHelper.GenerateReauthenticateUri(HttpContext, Configuration); ViewData["Reauthenticate"] = authorizationRequest; ViewData["EndSessionUri"] = Configuration.EndSessionEndpoint(); ViewData["IdTokenHint"] = HttpContext.GetTokenAsync(OpenIdConnectConstants.IdToken).Result; var callbackUrl = Url.Action("SignedOutCallback", "Account", values: null, protocol: Request.Scheme); ViewData["RedirectUrl"] = callbackUrl; ViewData["EnableSessionManagement"] = Configuration.EnableSessionManagement() ? "Yes" : "No"; ViewData["EnablePostLogout"] = Configuration.EnablePostLogout() ? "Yes" : "No"; if (Configuration.EnableSessionManagement()) { ViewData["CheckSessionIframeUri"] = Configuration.CheckSessionIframeUri(); } return(View()); }
private void InitializeDataForRPFrame() { var sessionState = HttpContext.User.Claims.Where(x => x.Type == OpenIdConnectConstants.SessionState).Select(x => x.Value).FirstOrDefault(); ViewData[OpenIdConnectConstants.ClientId] = configuration.ClientId(); ViewData[OpenIdConnectConstants.SessionState] = sessionState; ViewData["OPDomain"] = configuration.IssuerDomain(); var authorizationRequest = OpenIdConnectHelper.GenerateReauthenticateUri(HttpContext, configuration); ViewData["Reauthenticate"] = authorizationRequest; }