FriendsOfSymfony / FOSOAuthServerBundle

A server side OAuth2 Bundle for Symfony
1.09k stars 451 forks source link

How to add a custom Authentication Provider #674

Open softrare opened 3 years ago

softrare commented 3 years ago

I have a project taken over from someone who tries it with a custom compiler pass:

public function process(ContainerBuilder $container)
{
    $definition = $container->getDefinition('security.authentication.provider.custom');
    $definition->setClass(CustomAuthenticationProvider::class);
}

but it doesn't work, meaning the CustomAuthenticationProvider isn't called. How to do this?