I have two apps (app1, app2) in deploy folder configured for PICKETLINK single sign. Their picketlink-idfed.xmls are as follows:
For app1:
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/app1/</ServiceURL>
</PicketLinkSP>
For app2:
<PicketLinkSP xmlns="urn:picketlink:identity-federation:config:1.0">
<IdentityURL>http://localhost:8080/idp/</IdentityURL>
<ServiceURL>http://localhost:8080/app2/</ServiceURL>
</PicketLinkSP>
MY CASE:
1) Opened up my browser and enter URL: http://localhost:8080/app1/
2) It is correctly takes me to IDP login page where I entered my credentials. It authenticates me correctly and redirected to http://localhost:8080/app1/index.jsp
3) Index.jsp contains link to second app (app2) page as http://localhost:8080/app2/somefolder/myJsp.jsp
4) But when I click this link it is redirecting me to http://localhost:8080/app2/index.jsp (BUT ONLY FOR FIRST TIME WHEN I CLICK AGAIN IT IS TAKING ME CORRECTLY)
How can I solve this problem that on first click of app2 my IDP should route me to ORIGNIAL requested URI not to the SERVICE URL??
PLEASE HELP
The IDP redirects to the reply url in the saml request sent by the SP. The SAML request will utilize the service url specified by the SP.