KnpLabs/KnpOAuthBundle — comment on commit 9b2ad9723f7379ef6ab53a6e87a07b91101c525b
File: DependencyInjection/Security/Factory/OAuthFactory.php line 40
By geoffrey:

Well, the purpose of the SecurityFactory is to build custom services for each firewall configured in your security config file, that's why we define a new service with `$id` as a prefix, which is the firewall name, for example `secured_area` as in:

secured_area:
pattern: ^/demo/secured/
oauth:
oauth_provider: oauth
authorization_url: https://github.com/login/oauth/authorize

I agree it may not be very intuitive at first, but it's the way it's meant to be :-) I'll write a little something about the security component internals later, I learned a lot writing this bundle ;)