コード例 #1
0
        public ActionResult NewIntegration()
        {
            string             ClientID = clientID;
            YellowAntUserState yau      = new YellowAntUserState();

            yau.UserState    = Guid.NewGuid().ToString();
            yau.UserUniqueID = User.Identity.GetUserId();

            db.YellowAntUserStatesContext.Add(yau);
            db.SaveChanges();

            string url = "http://yellowant.yellowant.com/api/oauth2/authorize/?state=" + yau.UserState;

            url = url + "&client_id=" + ClientID + "&response_type=code&redirect_url=" + redirecturl + "/userintegration/oauthredirect";
            return(Redirect(url));
        }
コード例 #2
0
        public RedirectResult NewIntegration()
        {
            string             ClientID = "FvbTB2WePePZH3Zz7IEEvzPpe84FSosINSG67bus";
            YellowAntUserState yau      = new YellowAntUserState();

            yau.UserState    = Guid.NewGuid().ToString();
            yau.UserUniqueID = User.Identity.GetUserId();

            db.YellowAntUserStatesContext.Add(yau);
            db.SaveChanges();

            string url = "http://yellowant.yellowant.com/api/oauth2/authorize/?state=" + yau.UserState;

            url = url + "&client_id=" + ClientID + "&response_type=code&redirect_url=" + "http://f0008a02.ngrok.io/userintegration/oauthredirect";
            return(Redirect(url));
        }