src/fedoidcmsg/signing_service.py
def make_signing_service(config, entity_id):
    """
    Given configuration initiate a SigningService instance

    :param config: The signing service configuration
    :param entity_id: The entity identifier
    :return: A SigningService instance
    """

    _args = dict([(k, v) for k, v in config.items() if k in KJ_SPECS])
    _kj = init_key_jar(**_args)

    if config['type'] == 'internal':
        signer = InternalSigningService(entity_id, _kj)
    elif config['type'] == 'web':
        _kj.issuer_keys[config['iss']] = _kj.issuer_keys['']
        del _kj.issuer_keys['']
        signer = WebSigningServiceClient(config['iss'], config['url'],
                                         entity_id, _kj)
    else:
        raise ValueError('Unknown signer type: {}'.format(config['type']))

    return signer
def make_signing_service(config, entity_id):
    _args = dict([(k, v) for k, v in config.items() if k in KJ_SPECS])
    _kj = init_key_jar(**_args)

    if config['type'] == 'internal':
        signer = InternalSigningService(entity_id, _kj)
    elif config['type'] == 'web':
        _kj.issuer_keys[config['iss']] = _kj.issuer_keys['']
        del _kj.issuer_keys['']
        signer = WebSigningServiceClient(config['iss'], config['url'],
                                         entity_id, _kj)
    else:
        raise ValueError('Unknown signer type: {}'.format(config['type']))

    return signer
def make_signing_service ( config , entity_id ) : _args = dict ( [ ( k , v ) for k , v in config . items ( ) if k in KJ_SPECS ] ) _kj = init_key_jar ( * * _args ) if config [ 'type' ] == 'internal' : signer = InternalSigningService ( entity_id , _kj ) elif config [ 'type' ] == 'web' : _kj . issuer_keys [ config [ 'iss' ] ] = _kj . issuer_keys [ '' ] del _kj . issuer_keys [ '' ] signer = WebSigningServiceClient ( config [ 'iss' ] , config [ 'url' ] , entity_id , _kj ) else : raise ValueError ( 'Unknown signer type: {}' . format ( config [ 'type' ] ) ) return signer
Given configuration initiate a SigningService instance

    :param config: The signing service configuration
    :param entity_id: The entity identifier
    :return: A SigningService instance
Given configuration initiate a SigningService instance