<div dir="ltr">Hi!<div class="gmail_extra"><br></div><div class="gmail_extra">I probably find some solution (after few tests seems to work even if user browser is configured to block third party cookies), but it seems very non-standard/complicated.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">I have following page on client1 site (simulate top bar login box):</div><div class="gmail_extra">&lt;html&gt;</div><div class="gmail_extra">&lt;body&gt;</div><div class="gmail_extra">
<div class="gmail_extra">&lt;form id=&quot;ssoForm&quot; action=&quot;<a href="https://www.localhostsso.com:8443/remote/remote_login.jsp">https://www.localhostsso.com:8443/remote/remote_login.jsp</a>&quot; method=&quot;POST&quot;&gt;</div>
<div class="gmail_extra">&lt;input name=&quot;j_username&quot;/&gt;</div><div class="gmail_extra">&lt;input name=&quot;j_password&quot;/&gt;</div><div class="gmail_extra">&lt;input type=&quot;submit&quot;&gt;</div><div class="gmail_extra">
&lt;/form&gt;</div></div><div class="gmail_extra">&lt;/body&gt;</div><div class="gmail_extra">&lt;/html&gt;</div><div class="gmail_extra">When user submit this form data will be posted to custom jsp file hosted on the same domain as IdP.</div>
<div class="gmail_extra">Now how remote_login.jsp looks like:</div><div class="gmail_extra">----------------------------------------------------</div><div class="gmail_extra"><div class="gmail_extra">&lt;html&gt;</div><div class="gmail_extra">
&lt;body style=&quot;display: none&quot; onload=&quot;onSubmit()&quot;&gt;</div><div class="gmail_extra"><br></div><div class="gmail_extra">&lt;script type=&quot;text/javascript&quot;&gt;</div><div class="gmail_extra">var iframeLoaded = false;</div>
<div class="gmail_extra">function iframeLoadComplete() {</div><div class="gmail_extra">        // when iframe is loaded, there is login context at IdP (authentication request was send) - submit form to idp login handler.</div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>iframeLoaded = true;</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>document.getElementById(&#39;ssoForm&#39;).submit();</div>
<div class="gmail_extra">}</div><div class="gmail_extra">function onSubmit() {</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span></div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>if (!iframeLoaded) {</div>
<div class="gmail_extra">// this will create login cotext (this is real authentication request)</div><div class="gmail_extra">//------------------------------------------------------------------------------------------</div>
<div class="gmail_extra"><span class="" style="white-space:pre">                </span>document.getElementById(&#39;iframeContainer&#39;).innerHTML = &#39;&lt;iframe style=&quot;display: none&quot; src=&quot;<a href="https://www.localhost.com:8443/group/iag">https://www.localhost.com:8443/group/iag</a>&quot; onload=&quot;iframeLoadComplete()&quot; /&gt;&#39;;</div>
<div class="gmail_extra"><span class="" style="white-space:pre">                </span>return false;</div><div class="gmail_extra"><span class="" style="white-space:pre">        </span>} else {</div><div class="gmail_extra"><span class="" style="white-space:pre">                </span>return true;</div>
<div class="gmail_extra"><span class="" style="white-space:pre">        </span>}</div><div class="gmail_extra">}</div><div class="gmail_extra">&lt;/script&gt;</div><div class="gmail_extra"><br></div><div class="gmail_extra">&lt;div id=&quot;iframeContainer&quot;&gt;&lt;/div&gt;</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">&lt;form id=&quot;ssoForm&quot; action=&quot;<a href="https://www.localhostsso.com:8443/idp/j_security_check">https://www.localhostsso.com:8443/idp/j_security_check</a>&quot; method=&quot;POST&quot; onsubmit=&quot;return onSubmit();&quot;&gt;</div>
<div class="gmail_extra">&lt;input name=&quot;j_username&quot; value=&quot;&lt;%= request.getParameter(&quot;j_username&quot;) %&gt;&quot;/&gt;</div><div class="gmail_extra">&lt;input name=&quot;j_password&quot; value=&quot;&lt;%= request.getParameter(&quot;j_password&quot;) %&gt;&quot;/&gt;</div>
<div class="gmail_extra">&lt;input type=&quot;submit&quot;&gt;</div><div class="gmail_extra">&lt;/form&gt;</div><div class="gmail_extra"><br></div><div class="gmail_extra">&lt;/body&gt;</div><div class="gmail_extra">&lt;/html&gt;</div>
<div class="gmail_extra">-----------------------------------------</div><div class="gmail_extra">It&#39;s basically very similar to solution which I posted previously, but right now this jsp is hosted on the same domain as IdP - iframe could store cookie.</div>
</div><div class="gmail_extra">After IFrame is loaded (SAML authRequest is posted to IdP - login context created) - I post this page form to IdP login handler. (user/password is taken from original request parameters)</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Now I try to figure out how to handle potential errors (for example invalid login/password), how to transfer it back to client1 page (probably need to make some changes to j_security_check)</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Best Regards</div><div class="gmail_extra">Pawel<br><br><div class="gmail_quote">2014-05-09 8:49 GMT+02:00 Peter Schober <span dir="ltr">&lt;<a href="mailto:peter.schober@univie.ac.at" target="_blank">peter.schober@univie.ac.at</a>&gt;</span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">* Peter Schober &lt;<a href="mailto:peter.schober@univie.ac.at">peter.schober@univie.ac.at</a>&gt; [2014-05-09 08:39]:<br>

<div class="">&gt; Now if you want client1 to both ask for the credentials and actually<br>
&gt; verify those internally you can still create sessions on the IDP<br>
&gt; using the ExternalAuthn login handler:<br>
&gt; <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthExternal" target="_blank">https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthExternal</a><br>
<br>
</div>Probably not the way you wanted, though... I guess that method also<br>
assumes some previous interaction at the IDP (such as a SAML2<br>
authnRequest or IDP-initated request), otherwise you&#39;d be running into<br>
the same No Login Context issue?<br>
<div class=""><div class="h5">-peter<br>
--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br>
</div></div></blockquote></div><br></div></div>