• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Combine database, SAML, and OAuth in one application using spring security

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am implementing authentication and authorization in the spring boot(2.2.4) app using spring security(spring-security-starter). I want below 3 things in one application:

  • Authenticate User using database (I am using hibernate)- For this I can use spring's UserDetailService
  • Authenticate User using SAML 2.0 protocol- Using Okta as identity provider, can use others as well like OneLogin etc.
  • Authenticate User using OAuth 2.0 protocol- can authenticate user with Github, Google, Facebook

  • I also want to know how can I enable and disable a particular one by setting some properties in application.properties file.

    I am able to authenticate the user using SAML, and OAuth in separate applications, see the code below, but I want all these three(3) in one application.

    Tried: I tried to achieve this with the help of this article but couldn't get that how to do the proper configuration.

    Using SAML:

    Using OAuth 2.0

    It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
    a bit of art, as a gift, the permaculture playing cards
      Bookmark Topic Watch Topic
    • New Topic