I want to use tomcat's realm mechanism for authorization, but I want to allow users to either login directly (say JDBCRealm) or login via OAuth2 (say through LinkedIn). I found out that in principle, one could use CombinedRealm to combine two different methods of authentication, but I cannot find anything about any realm implementation for OAuth2.
PS: I am also open to completely different way to allow the dual authentication requirement.
There is no out-of-the-box implementation of an OAuth Realm for Tomcat. There is, however, a JASPIC adapter for Tomcat can be used for arbitrary authentication back-ends.
There is a community-contributed back-end that provider OAuth2.
Your mileage may vary ... greatly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With