• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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

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

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

     
    reply
      Bookmark Topic Watch Topic
    • New Topic