コード例 #1
0
ファイル: TencentController.cs プロジェクト: JPomichael/IPOW
        public RedirectResult LogOn(string returnUrl)
        {
            if (string.IsNullOrEmpty(returnUrl))
            {
                returnUrl = "http://sso.ipow.cn";
                //returnUrl = "http://www.ipow.cn";
            }
            Session[Infrastructure.Crosscutting.Comm.Service.ConstService.SessionNameTencentReturnUrl] = returnUrl;
            var    context           = new QConnectSDK.Context.QzoneContext();
            string token             = Guid.NewGuid().ToString().Replace("-", "");
            string scope             = "get_user_info,add_share,list_album,upload_pic,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,add_one_blog,add_topic,get_tenpay_addr";
            var    authenticationUrl = context.GetAuthorizationUrl(token, scope);

            Session[Infrastructure.Crosscutting.Comm.Service.ConstService.SessionNameTencentOauthToken] = token;
            return(Redirect(authenticationUrl));
        }
コード例 #2
0
ファイル: TencentController.cs プロジェクト: JPomichael/Miaow
 public RedirectResult LogOn(string returnUrl)
 {
     if (string.IsNullOrEmpty(returnUrl))
     {
         returnUrl = "http://sso.Miaow.cn";
         //returnUrl = "http://www.Miaow.cn";
     }
     Session[Infrastructure.Crosscutting.Comm.Service.ConstService.SessionNameTencentReturnUrl] = returnUrl;
     var context = new QConnectSDK.Context.QzoneContext();
     string token = Guid.NewGuid().ToString().Replace("-", "");
     string scope = "get_user_info,add_share,list_album,upload_pic,check_page_fans,add_t,add_pic_t,del_t,get_repost_list,get_info,get_other_info,get_fanslist,get_idolist,add_idol,del_idol,add_one_blog,add_topic,get_tenpay_addr";
     var authenticationUrl = context.GetAuthorizationUrl(token, scope);
     Session[Infrastructure.Crosscutting.Comm.Service.ConstService.SessionNameTencentOauthToken] = token;
     return Redirect(authenticationUrl);
 }