Exemplo n.º 1
0
        private OAuthConnection getAuthConnection()
        {
            // TODO: there needs to be a way to reset these values, otherwise cannot
            // change server!

            OAuthConnection auth = new OAuthConnection();

            auth.accessToken = Preferences.GetString(Preferences.Key.ACCESS_TOKEN);
            auth.accessTokenSecret = Preferences
                    .GetString(Preferences.Key.ACCESS_TOKEN_SECRET);
            auth.requestToken = Preferences
                    .GetString(Preferences.Key.REQUEST_TOKEN);
            auth.requestTokenSecret = Preferences
                    .GetString(Preferences.Key.REQUEST_TOKEN_SECRET);
            auth.oauth10a = Preferences.GetBoolean(Preferences.Key.OAUTH_10A);
            auth.authorizeUrl = Preferences
                    .GetString(Preferences.Key.AUTHORIZE_URL);
            auth.accessTokenUrl = Preferences
                    .GetString(Preferences.Key.ACCESS_TOKEN_URL);
            auth.requestTokenUrl = Preferences
                    .GetString(Preferences.Key.REQUEST_TOKEN_URL);
            auth.rootApi = Preferences
                    .GetString(Preferences.Key.SYNC_SERVER_ROOT_API);
            auth.userApi = Preferences
                    .GetString(Preferences.Key.SYNC_SERVER_USER_API);

            return auth;
        }
Exemplo n.º 2
0
        private void reauthenticate()
        {
            // don't do anything, we'll authenticate on sync instead
            // save empty config, wiping old config

            OAuthConnection auth = new OAuthConnection();
            auth.saveConfiguration();
        }