Add support for multiple authentication factories

I needed to get support for both OAuth2 and Basic Authentication on my REST service. So i wrote this class. I think it could be useful to other people.