I have an application that has so far been using Basic authentication. One of the requirements of the application was to allow authentication using OAuth.
I have started to implement this using the OAuthServiceProvider
(https://github.com/gigablah/silex-oauth) and I have got it to work.
However I would like to have multiple authentication providers. This is so that I can register users within the application for people that do not have such accounts or do not want to use them. This is also because I have a local system user that has 'admin' rights on the application.
I have read around this and I have seen that Symfony 2 has a chain_provider
for the security provider. As Silex is based off Symfony I wondered if it possible to implement this in Silex.
I have looked at the code to do it in Symfony - http://symfony.com/doc/current/cookbook/security/multiple_user_providers.html. But I do not know how to translate the YML configuration into service registrations in Silex.
Any help is greatly appreciated.
UPDATE (10 May 2016)
I have removed some information here as it was incorrect. It is not possible to get Silex to use Form and OAuth authentication out of the box.
I will have to go with just OAuth for the moment and live with the fact I cannot have local authentication as well. I want to look into the 'Guard Authentication' as mentioned in the comments, but I cannot find how to use this in Silex at the moment, if anyone has done this and has an example of how to configure the Silex App to use it that would be great.