sregistry/main/globus/__init__.py
def _update_tokens(self):
        '''Present the client with authentication flow to get tokens from code.
           This simply updates the client _response to be used to get tokens
           for auth and transfer (both use access_token as index). We call
           this not on client initialization, but when the client is actually
           needed.
        '''

        self._client.oauth2_start_flow(refresh_tokens=True)
        authorize_url = self._client.oauth2_get_authorize_url()
        print('Please go to this URL and login: {0}'.format(authorize_url))

        auth_code = raw_input(
                    'Please enter the code you get after login here: ').strip()

        # Save to client

        self._response = self._client.oauth2_exchange_code_for_tokens(auth_code)
        self.auth = self._response.by_resource_server['auth.globus.org']
        self.transfer = self._response.by_resource_server['transfer.api.globus.org']
        self._update_setting('GLOBUS_TRANSFER_RESPONSE', self.transfer)
        self._update_setting('GLOBUS_AUTH_RESPONSE', self.auth)
def _update_tokens(self):
        '''Present the client with authentication flow to get tokens from code.
           This simply updates the client _response to be used to get tokens
           for auth and transfer (both use access_token as index). We call
           this not on client initialization, but when the client is actually
           needed.
        '''

        self._client.oauth2_start_flow(refresh_tokens=True)
        authorize_url = self._client.oauth2_get_authorize_url()
        print('Please go to this URL and login: {0}'.format(authorize_url))

        auth_code = raw_input(
                    'Please enter the code you get after login here: ').strip()

        # Save to client

        self._response = self._client.oauth2_exchange_code_for_tokens(auth_code)
        self.auth = self._response.by_resource_server['auth.globus.org']
        self.transfer = self._response.by_resource_server['transfer.api.globus.org']
        self._update_setting('GLOBUS_TRANSFER_RESPONSE', self.transfer)
        self._update_setting('GLOBUS_AUTH_RESPONSE', self.auth)
Present the client with authentication flow to get tokens from code.
           This simply updates the client _response to be used to get tokens
           for auth and transfer (both use access_token as index). We call
           this not on client initialization, but when the client is actually
           needed.