/// <summary>
		/// 从Url加载
		/// </summary>
		public static OpenIDIdentity LoadFromUrl()
		{
			Common.CheckHttpContext();

			OpenIDIdentity identity = null;

			string openID = HttpContext.Current.Request.QueryString["openID"];

			if (openID.IsNotEmpty())
				identity = new OpenIDIdentity(openID);

			return identity;
		}
Example #2
0
        /// <summary>
        /// 从Url加载
        /// </summary>
        public static OpenIDIdentity LoadFromUrl()
        {
            Common.CheckHttpContext();

            OpenIDIdentity identity = null;

            string openID = HttpContext.Current.Request.QueryString["openID"];

            if (openID.IsNotEmpty())
            {
                identity = new OpenIDIdentity(openID);
            }

            return(identity);
        }
		/// <summary>
		/// 从Cookie中加载
		/// </summary>
		/// <returns></returns>
		public static OpenIDIdentity LoadFromCookie()
		{
			Common.CheckHttpContext();

			OpenIDIdentity identity = null;

			HttpRequest request = HttpContext.Current.Request;

			HttpCookie cookie = request.Cookies["openID"];

			if (cookie != null)
			{
				string openID = cookie.Value;

				if (openID.IsNotEmpty())
					identity = new OpenIDIdentity(cookie.Value);
			}

			return identity;
		}
Example #4
0
        /// <summary>
        /// 从Cookie中加载
        /// </summary>
        /// <returns></returns>
        public static OpenIDIdentity LoadFromCookie()
        {
            Common.CheckHttpContext();

            OpenIDIdentity identity = null;

            HttpRequest request = HttpContext.Current.Request;

            HttpCookie cookie = request.Cookies["openID"];

            if (cookie != null)
            {
                string openID = cookie.Value;

                if (openID.IsNotEmpty())
                {
                    identity = new OpenIDIdentity(cookie.Value);
                }
            }

            return(identity);
        }