예제 #1
0
        private void LoginCompleted(LoginInfo info)
        {
            Dispatcher.BeginInvoke(() =>
            {
                SetWorking(false);

                if (info == null)
                {
                    MessageBox.Show(DropBoxResources.LoginFailure,
                        DropBoxResources.LoginTitle,
                        MessageBoxButton.OK);

                    txtEmail.Focus();
                    txtEmail.SelectAll();

                    return;
                }

                txtPassword.Password = string.Empty;

                var folder = NavigationContext
                    .QueryString["folder"];

                this.NavigateTo<List>(
                    "token={0}&secret={1}&path=/&folder={2}",
                    info.Token, info.Secret, folder);
            });
        }
예제 #2
0
파일: Client.cs 프로젝트: MarioBinder/7Pass
        private void InitAuthenticator(string token, string secret)
        {
            _loginInfo = new LoginInfo
            {
                Token = token,
                Secret = secret,
            };

            var credentials = OAuthCredentials.ForAccessToken(
                DropBoxInfo.KEY, DropBoxInfo.SECRET, token, secret);

            _client.Credentials = credentials;
            _fileClient.Credentials = credentials;
        }
예제 #3
0
파일: Client.cs 프로젝트: MarioBinder/7Pass
 private void ClearAuthenticator()
 {
     _loginInfo = null;
     _client.Credentials = null;
     _fileClient.Credentials = null;
 }