Esempio n. 1
0
 // use this if you want to re-start an infinite session
 public DiscuzSession(string api_key, SessionInfo session_info, string forum_url)
     : this(api_key, session_info.Secret, forum_url)
 {
     this.session_info = session_info;
     this.forum_url = forum_url;
 }
Esempio n. 2
0
        /// <summary>
        /// 从令牌中获得会话
        /// </summary>
        /// <param name="auth_token"></param>
        /// <returns></returns>
        public SessionInfo GetSessionFromToken(string auth_token)
        {
            this.session_info = util.GetResponse<SessionInfo>("auth.getSession",
                    DiscuzParam.Create("auth_token", auth_token));
            //this.util.SharedSecret = session_info.Secret;

            this.auth_token = string.Empty;
            this.session_info.Secret = util.SharedSecret;
            return session_info;
        }