both is posible, if you go for a federations set up, we can use our own by pure chance we wanted to use PACT to get the contract of our securty api and clients in mangement. And slowly the rest. THe paper I sugest to read is
https://msdn.microsoft.com/en-us/library/aa479079.aspx. And we use 0Auth for all our outsourced services (eg our SonarQube and Buildsystems and stuff). It connects to the 0Auth server who in the end connects to our own network and Ldap.