confidant_client/__init__.py
def list_blind_credentials(self):
        """Get a list of blind credentials."""
        # Return a dict, always with an attribute that specifies whether or not
        # the function was able to successfully get a result.
        ret = {'result': False}
        # Make a request to confidant with the provided url, to fetch the
        # service providing the service name and base64 encoded
        # token for authentication.
        try:
            response = self._execute_request(
                'get',
                '{0}/v1/blind_credentials'.format(self.config['url'])
            )
        except RequestExecutionError:
            logging.exception('Error with executing request')
            return ret
        try:
            data = response.json()
        except ValueError:
            logging.error('Received badly formatted json data from confidant.')
            return ret
        ret['blind_credentials'] = data['blind_credentials']
        ret['result'] = True
        return ret
Get a list of blind credentials.
Get a list of blind credentials.
Get a list of blind credentials .
def list_blind_credentials(self):
        ret = {'result': False}
        try:
            response = self._execute_request(
                'get',
                '{0}/v1/blind_credentials'.format(self.config['url'])
            )
        except RequestExecutionError:
            logging.exception('Error with executing request')
            return ret
        try:
            data = response.json()
        except ValueError:
            logging.error('Received badly formatted json data from confidant.')
            return ret
        ret['blind_credentials'] = data['blind_credentials']
        ret['result'] = True
        return ret
def list_blind_credentials ( self ) : ret = { 'result' : False } try : response = self . _execute_request ( 'get' , '{0}/v1/blind_credentials' . format ( self . config [ 'url' ] ) ) except RequestExecutionError : logging . exception ( 'Error with executing request' ) return ret try : data = response . json ( ) except ValueError : logging . error ( 'Received badly formatted json data from confidant.' ) return ret ret [ 'blind_credentials' ] = data [ 'blind_credentials' ] ret [ 'result' ] = True return ret
Get a list of blind credentials.
Get a list of blind credentials .
"""Get a list of blind credentials.""" # Return a dict, always with an attribute that specifies whether or not # the function was able to successfully get a result. # Make a request to confidant with the provided url, to fetch the # service providing the service name and base64 encoded # token for authentication.
self