示例#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;
		}
示例#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);
        }
示例#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;
		}
示例#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);
        }