protected function createResourceOwnerMap(ContainerBuilder $container, $id, array $config)
    {
        $definitionClassname = $this->getDefinitionClassname();

        $resourceOwnersMap = [];
        foreach ($config['resource_owners'] as $name => $checkPath) {
            $resourceOwnersMap[$name] = $checkPath;
        }
        $container->setParameter('hwi_oauth.resource_ownermap.configured.'.$id, $resourceOwnersMap);

        $container
            ->setDefinition($this->getResourceOwnerMapReference($id), new $definitionClassname('hwi_oauth.abstract_resource_ownermap'))
            ->replaceArgument(2, new Parameter('hwi_oauth.resource_ownermap.configured.'.$id))
            ->setPublic(true)
        ;
    }