Example #1
0
        async Task <HttpResponseMessage> HandleInteraction(
            AuthorizationResponse response)
        {
            // Store some variables into TempData so that they can
            // be referred to in AuthorizationDecisionController.
            var data = new UserTData(TempData);

            data.Set("ticket", response.Ticket);
            data.SetObject("claimNames", response.Claims);
            data.SetObject("claimLocales", response.ClaimsLocales);

            // Clear user information in TempData if necessary.
            ClearUserDataIfNecessary(response, data);

            // Prepare a model object which is needed to render
            // the authorization page.
            var model = new AuthorizationPageModel(
                response, data.GetUserEntity());

            // Render the authorization page manually.
            string html = await Render(VIEW_NAME, model);

            // Return "200 OK" with "text/html".
            return(ResponseUtility.OkHtml(html));
        }