How can we capture the REQUEST_URI
into an Apache variable and after third party SSO authentication?
We have a third party SSO authentication in place, which is working fine. After successful authentication, the third-party tool redirects to our main application (mainApp
) along with a few HTTP header variables. The successful URL mapped in SSO redirect is https://example.com/mainApp/*
.
For Example:
User requests URL: https://example.com/mainApp/page=123
=> Goes to SSO Authentication => Redirects to our application URL with http header variable => https://example.com/mainApp/page=123
.
High level Architecture is
Apache => SSO Auth => Tomcat Application
But we have a new sub-application after our main app. For example https://example.com/mainApp/appA/page=123
, since the third-party SSO always redirects to the main application which is mainApp
, how can we capture the user request URL and redirect to the original request?
The current setting is done in the vhosts file with <Location /mainApp>
.
Is it possible to capture the REQUEST_URI
into an Apache variable before hitting the SSO auth and after successful auth; Substitute into main app URL,
And redirect to user request URL which is our sub-application? Basically, we want to substitute the sub application after SSO Auth.
I appreciate anyone's help.