コード例 #1
0
ファイル: Login.aspx.cs プロジェクト: KenoLeon/shapeways-api
        protected void Page_Load(object sender, EventArgs e)
        {
            ShapewaysClient client = new ShapewaysClient(
                "CONSUMER TOKEN",
                "CONSUMER SECRET",
                "http://localhost:49314/Callback.aspx"
            );

            var url = client.connect();
            Session["oauth_token"] = client.OAuthToken;
            Session["oauth_secret"] = client.OAuthSecret;
            Response.Redirect(url);
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            ShapewaysClient client = new ShapewaysClient(
                "CONSUMER TOKEN",
                "CONSUMER SECRET",
                "http://localhost:49314/Callback.aspx"
                );

            var url = client.connect();

            Session["oauth_token"]  = client.OAuthToken;
            Session["oauth_secret"] = client.OAuthSecret;
            Response.Redirect(url);
        }
コード例 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["oauth_secret"] == null || Session["oauth_token"] == null)
            {
                Response.Redirect("/Login.aspx");
                return;
            }
            ShapewaysClient client = new ShapewaysClient(
                "CONSUMER TOKEN",
                "CONSUMER SECRET",
                "http://localhost:49314/Callback.aspx"
                );

            client.OAuthSecret = Session["oauth_secret"].ToString();
            client.OAuthToken  = Session["oauth_token"].ToString();
            this.apiInfo       = client.getApiInfo();
        }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["oauth_secret"] == null)
     {
         Response.Redirect("/Login.aspx");
         return;
     }
     ShapewaysClient client = new ShapewaysClient(
         "CONSUMER TOKEN",
         "CONSUMER SECRET",
         "http://localhost:49314/Callback.aspx"
     );
     client.OAuthSecret = Session["oauth_secret"].ToString();
     client.verifyUrl(Request.RawUrl);
     Session["oauth_secret"] = client.OAuthSecret;
     Session["oauth_token"] = client.OAuthToken;
     Response.Redirect("/");
 }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["oauth_secret"] == null)
            {
                Response.Redirect("/Login.aspx");
                return;
            }
            ShapewaysClient client = new ShapewaysClient(
                "CONSUMER TOKEN",
                "CONSUMER SECRET",
                "http://localhost:49314/Callback.aspx"
                );

            client.OAuthSecret = Session["oauth_secret"].ToString();
            client.verifyUrl(Request.RawUrl);
            Session["oauth_secret"] = client.OAuthSecret;
            Session["oauth_token"]  = client.OAuthToken;
            Response.Redirect("/");
        }