For example, you have TWO different folders on your web site, /folderA and /folderB
You can set the common loginURL for both of these pages in Spring Security.
I use Spring SAML. It aal
- Spring Security: Once users try to get
/folderA
or/folderB
, they will be redirected to the "local" LoginURL first (domain.com/auth
). - Spring SAML: LoginURL page (
domain.com/auth
) will redirect the user to the remote SAML SSO provider (for example,myapp.okta.com
). The endpoint is specified in metadata.xml. - SAML SSO provider redirects the user to SSO url (configured in OKTA, let's say
sso.domain.com/auth/sso
). - I want to use the original requested URL (in this case, /folderA or /folder) in the SSO controller (
sso.domain.com/auth/sso
). I want to make the logic dependent on the requested URL.
So my question is
How to inject these folder URLs into the request to SAML SSO Provider using Spring SAML? I know how to implement it without Spring SAML. So I am looking how to configure Spring SAML for it.
I think that RELAY_STATE
is used for it. But I can’t understand on how to retrieve it at the steps (1) and/or (2)