/// <summary></summary>
        /// <param name="context"></param>
        /// <param name="principal"></param>
        /// <param name="extra"></param>
        public static void SignIn(this HttpContextBase context, ClaimsPrincipal principal, AuthenticationExtra extra)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            OwinResponse response = GetOwinResponse(context);

            response.Grant(principal, extra);
        }
示例#2
0
        /// <summary></summary>
        /// <param name="context"></param>
        /// <param name="user"></param>
        public static void SignIn(this HttpContext context, ClaimsPrincipal user)
        {
            if (context == null)
            {
                throw new ArgumentNullException("context");
            }

            OwinResponse response = GetOwinResponse(context);

            response.Grant(user);
        }
示例#3
0
 public void SignIn(AuthenticationExtra extra, params ClaimsIdentity[] identities)
 {
     _response.Grant(new ClaimsPrincipal(identities), extra);
 }