src/fedoidcmsg/operator.py
def extend_with_ms(self, req, sms_dict):
        """
        Add signed metadata statements to a request

        :param req: The request 
        :param sms_dict: A dictionary with FO IDs as keys and signed metadata
            statements (sms) or uris pointing to sms as values.
        :return: The updated request
        """
        _ms_uri = {}
        _ms = {}
        for fo, sms in sms_dict.items():
            if sms.startswith('http://') or sms.startswith('https://'):
                _ms_uri[fo] = sms
            else:
                _ms[fo] = sms

        if _ms:
            req['metadata_statements'] = Message(**_ms)
        if _ms_uri:
            req['metadata_statement_uris'] = Message(**_ms_uri)
        return req
def extend_with_ms(self, req, sms_dict):
        _ms_uri = {}
        _ms = {}
        for fo, sms in sms_dict.items():
            if sms.startswith('http://') or sms.startswith('https://'):
                _ms_uri[fo] = sms
            else:
                _ms[fo] = sms

        if _ms:
            req['metadata_statements'] = Message(**_ms)
        if _ms_uri:
            req['metadata_statement_uris'] = Message(**_ms_uri)
        return req
def extend_with_ms ( self , req , sms_dict ) : _ms_uri = { } _ms = { } for fo , sms in sms_dict . items ( ) : if sms . startswith ( 'http://' ) or sms . startswith ( 'https://' ) : _ms_uri [ fo ] = sms else : _ms [ fo ] = sms if _ms : req [ 'metadata_statements' ] = Message ( * * _ms ) if _ms_uri : req [ 'metadata_statement_uris' ] = Message ( * * _ms_uri ) return req
Add signed metadata statements to a request

        :param req: The request 
        :param sms_dict: A dictionary with FO IDs as keys and signed metadata
            statements (sms) or uris pointing to sms as values.
        :return: The updated request
Add signed metadata statements to a request