I want a centralized authenticator for various App. This authenticator must allow me to login with Facebook, Google and with a form (using my local DB).
Can I use Oauth2 for Google, Git and Facebook and OpenId connect (mitreID connect in particular) for my own database?
In particular I don't know if it is necessary to use openId for this purpose.
What could be the best way to do so?
Apache Oltu OAuth 2.0 Client and Provider at GitHub repository is a fork of Apache Oltu with Pull Request #10 for two new commits "Add provider demo and README".
(1) Quote "This authenticator must allow me to login with Facebook, Google and with a form (using my local DB)."
Response:
You can follow the README instruction to build Oltu and run the OAuth 2.0 client demo and the OAuth 2.0 provider demo to illustrate the OAuth 2.0 authentication/authorization flow between a local OAuth 2.0 client and a local OAuth 2.0 server, Facebook, Google, Github, LinkedIn, Microsoft, and Instagram.
You can modify "demos/client-demo/src/main/webapp/WEB-INF/views/index.jsp" to list the login buttons for Facebook and Google below a form (using my local DB).
Remark: For demo purpose, local OAuth 2.0 server (developed by Apache Oltu OAuth 2.0 Client and Provider at GitHub repository) uses a data file "demos/provider-demo/src/main/java/org/apache/oltu/oauth2/provider/demo/Common.java" instead of a local DB to store a user info.
(2) Question "Can I use Oauth2 for Google, Git and Facebook and OpenId connect (mitreID connect in particular) for my own database?"
Answer:
Yes. You can use Oauth2 for Google, Git and Facebook and OpenId connect (mitreID connect in particular) for your own database. You just need to map the user info sent by Google, Git and Facebook and OpenId connect (mitreID connect in particular) with the local user info stored in your own database.
The code "demos/client-demo/src/main/java/org/apache/oltu/oauth2/client/demo/controller/ResourceController.java" resourceResponse.getBody() retrieves the user info sent by Google, Git and Facebook and OpenId connect (mitreID connect in particular).
(3) Quote "In particular I don't know if it is necessary to use openId for this purpose."
Response:
Apache Oltu OpenID Connect Client and Provider at GitHub repository, which develops a local OpenID Connect client and a OpenID Connect server based on Apache Oltu, can be a reference for a centralized OpenID Connect client "if it is necessary to use openId for your centralized authenticator for various App".