Beispiel #1
0
        public IActionResult Login()
        {
            Kite kc = new Kite("z5xy8uzid74zcvu5");

            ViewData["LoginURL"] = kc.GetLoginURL();

            return(View());
        }
Beispiel #2
0
        public string GetLoginURL()
        {
            Kite = new Kite(MyAPIKey, Debug: true);
            Kite.SetSessionExpiryHook(onTokenExpire);
            var loginURL = Kite.GetLoginURL();

            return(loginURL);
        }
Beispiel #3
0
        private static void initSession()
        {
            Console.WriteLine("Goto " + kite.GetLoginURL());
            Console.WriteLine("Enter request token: ");
            string requestToken = Console.ReadLine();
            User   user         = kite.RequestAccessToken(requestToken, MySecret);

            Console.WriteLine(JsonSerialize(user));

            MyAccessToken = user.AccessToken;
            MyPublicToken = user.PublicToken;
        }
Beispiel #4
0
        private void InitSession()
        {
            AccessToken = "5H8MTIqm84MA30w2uvVEjLP9CYrvQZlj";
            PublicToken = "1yPi2XwKgMZuWzSVuc4nC7Jfo4tJbWp9";

            if (string.IsNullOrEmpty(AccessToken) || string.IsNullOrEmpty(PublicToken))
            {
                string url          = Kite.GetLoginURL();
                string requestToken = "xrmMR292jffBD5624HXkjLzlQuapvlUw";
                User   user         = Kite.GenerateSession(requestToken, appSecret);

                AccessToken = user.AccessToken;
                PublicToken = user.PublicToken;
            }
        }
Beispiel #5
0
 public string GetLoginURL()
 {
     kite = new Kite(MyAPIKey);
     return(kite.GetLoginURL());
 }