0
votes

I have this repo: https://github.com/oktadeveloper/okta-spring-boot-saml-example . After user login in identity provider(okta, azure AD,...), user can access website.

Flow is:

  1. website request SAML assertion
  2. user login with user and password
  3. identity provider return SAML assertion
  4. server make a post request to /saml/sso with SAML assertion to do authentication

But I have a question: how i get SAML assertion from ReactJS and send SAML assertion to springboot to get access token.

Thanks you for your reading!

2

2 Answers

0
votes

the SAML bearer assertion flow of OAuth does help in fetching an OAuth token (access-token) using a SAML Assertion as described here: https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-token-exchange-saml-oauth

0
votes

After some brain storm,

I use spring mvc to create a page: server.com/sso, Angular will re-direct to server.com/sso, after user provide credentials to microsoft AD, I will generate token from information in SAML assertion, then send it to Angular by re-direct.

Thanks.