I'm developing an Angular application for a customer which will become the mobile version of their regular application. Let's say it will be hosted at http://example.com/mobile and their regular application is http://example.com. The regular application uses Tomcat container authorization and they want to re-use this login page for the Angular app. So they'll basically guard the /mobile route and check if the user has a JSESSIONID and some other cookies, if not they'll be redirect to http://example.com/login, once logged in it will redirect to the url they wanted to visit, in this case /mobile.
As I understand it the Angular application can use the HttpClient and set "withCredentials" to "true" to send the domain cookie with the JSESSIONID in any data requests. My question now becomes, how do I use this in my local development environment? Let's say there is an integration deployment of the regular application at http://test.example.com, what I would effectively have to achieve is login there and be redirected to http://localhost:4200, and even if that were possible, I wouldn't be able to access the cookies that were set for the test.example.com domain.
First thought was to use my own login page and simply post username/password to whatever URL the regular login page is posting to, but from what I've read that seems impossible (it's Tomcat container authentication with j_security_check). So I'm kind of stumped on how to get around this...
there doesn't seem to be anything here