<div dir="ltr">I realized that I badly explained it, I'll try with some pseudo code:<div><br>The servlet doGet method handles the external authentication:<blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>                     String key = ExternalAuthentication.startExternalAuthentication(request);</div><div>                        store(key);</div><div>                              request.setAttribute("challenge", challenge);</div><div>                          request.getRequestDispatcher("/jsp.jsp").forward(request, response);</div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>//the jsp simply shows the challenge to the user</div><div><br></div></blockquote>To complete the authentication, the user (using an authenticator) signs the challenge and sends the signature to the servlet using a POST.</div><div><br></div><div>The servlet doPost method receive the data:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>verify the signature</div><div>retrieve the flow key</div><div>ExternalAuthentication.finishExternalAuthentication(key, request, response);<br></div><div><br></div></blockquote>At this point, the external authentication has been completed but the user still sees the jsp.<div><br></div><div>Thanks, </div><div>Cristiano</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 22 nov 2021 alle ore 20:50 Cantor, Scott <<a href="mailto:cantor.2@osu.edu">cantor.2@osu.edu</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 11/22/21, 2:38 PM, "users on behalf of Cristiano Palazzi" <<a href="mailto:users-bounces@shibboleth.net" target="_blank">users-bounces@shibboleth.net</a> on behalf of <a href="mailto:cristianopalazzi@gmail.com" target="_blank">cristianopalazzi@gmail.com</a>> wrote:<br>
<br>
>    I test it with a client REST API and the response's header contains a redirect to the IDP as expected, but I am<br>
> not able to apply this redirect to the JSP.<br>
<br>
I don't know what you mean, but there's nothing to "apply" nor is there a JSP involved unless you built it. You either invoke the finish function during the end of the server-side interaction with the client or you don't. The client does the redirect back into the flow logic because the client is what receives the 302 response from the server.<br>
<br>
-- Scott<br>
<br>
<br>
-- <br>
For Consortium Member technical support, see <a href="https://shibboleth.atlassian.net/wiki/x/ZYEpPw" rel="noreferrer" target="_blank">https://shibboleth.atlassian.net/wiki/x/ZYEpPw</a><br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net" target="_blank">users-unsubscribe@shibboleth.net</a><br>
</blockquote></div>