Пример #1
0
 //https://login.live.com/oauth20_authorize.srf?client_id=0000000040170F15&scope=wl.basic&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf
 public OneDriveController()
 {
     m_webBrowserForm = new OneDriveAuthorizationFrom();
     m_webBrowserForm.simpleButtonOk.Click += new EventHandler(this.ButtonOkClick);
     m_webBrowserForm.simpleButtonCancel.Click += new EventHandler(this.ButtonCancelClick);
     string url = string.Format("https://login.live.com/oauth20_authorize.srf?client_id={0}&scope={1}&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf", CLIEND_ID, SCOPE_STRING);
     m_webBrowserForm.webBrowser.Navigate(url);
 }
Пример #2
0
        private const string SCOPE_STRING  = "wl.basic"; //scope = "wl.basic"; //onedrive.appfolder
        public OneDriveController()                      //https://login.live.com/oauth20_authorize.srf?client_id=0000000040170F15&scope=wl.basic&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf
        {
            m_webBrowserForm = new OneDriveAuthorizationFrom();
            m_webBrowserForm.simpleButtonOk.Click     += new EventHandler(this.ButtonOkClick);
            m_webBrowserForm.simpleButtonCancel.Click += new EventHandler(this.ButtonCancelClick);
            string url = string.Format("https://login.live.com/oauth20_authorize.srf?client_id={0}&scope={1}&response_type=code&redirect_uri=https://login.live.com/oauth20_desktop.srf", CLIEND_ID, SCOPE_STRING);

            m_webBrowserForm.webBrowser.Navigate(url);
        }