Esempio n. 1
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;
		}
Esempio n. 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);
        }
Esempio n. 3
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;
		}
Esempio n. 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);
        }