ChainStoreWeb.SharePointAcsContextProvider.SaveSharePointContext C# (CSharp) Method

SaveSharePointContext() protected method

protected SaveSharePointContext ( SharePointContext spContext, System.Web.HttpContextBase httpContext ) : void
spContext SharePointContext
httpContext System.Web.HttpContextBase
return void
        protected override void SaveSharePointContext(SharePointContext spContext, HttpContextBase httpContext)
        {
            SharePointAcsContext spAcsContext = spContext as SharePointAcsContext;

            if (spAcsContext != null)
            {
                HttpCookie spCacheKeyCookie = new HttpCookie(SPCacheKeyKey)
                {
                    Value = spAcsContext.CacheKey,
                    Secure = true,
                    HttpOnly = true
                };

                httpContext.Response.AppendCookie(spCacheKeyCookie);
            }

            httpContext.Session[SPContextKey] = spAcsContext;
        }