예제 #1
0
        /// <summary>
        /// Creates the user authentication ticket.
        /// </summary>
        /// <param name="code">The code.</param>
        /// <param name="httpContext">The HTTP context.</param>
        public void CreateAuthenticationTicket(string code, HttpContextBase httpContext)
        {
            string returnUrl   = httpContext.Request.Url.AbsoluteUri;
            string accessToken = _thirdPartyLoginService.GetAccessToken(code, returnUrl);

            CreateAuthenticationTicket(new MyEventsIdentity()
            {
                AccessToken = accessToken
            }, httpContext);
            SetPrincipal(httpContext);
        }