Thanks, Holly - excellent. I think that will really help us too!<br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 3:06 PM, Wang, Holly <span dir="ltr">&lt;<a href="mailto:holly.wang@csun.edu">holly.wang@csun.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Hi, <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thank you for your advice, Karla. <u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I finally got it work by insert some code at the login.jsp page. The basic idea still is keep the current login form, then display another form based on the loginContext.getRelyingPartyId()<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Here is my code to add in the login.jsp<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">&lt;%@ page import=&quot;edu.internet2.middleware.shibboleth.idp.util.HttpServletHelper&quot; %&gt;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">&lt;%@ page import=&quot;org.opensaml.util.storage.StorageService&quot; %&gt;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">&lt;%@ page import=&quot;edu.internet2.middleware.shibboleth.idp.authn.LoginContext&quot; %&gt;<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">&lt;%@ page import = &quot;java.util.*&quot; %&gt;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">&lt;%<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                   if (loginContext!=null){<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                     if(loginContext.getRelyingPartyId()!=null ){<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                       if(loginContext.getRelyingPartyId().equals(&quot;<a href="http://your" target="_blank">http://your</a> log in site&quot;) ){<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                        %&gt;<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Then display another form with action post to another site<u></u><u></u></span></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Many thanks for your help. Hope my case help others too<u></u><u></u></span></p>
<div class="im"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Holly Wang, IT Department  CSUN, <a href="tel:818-677-2031" value="+18186772031" target="_blank">818-677-2031</a><u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u> <u></u></span></p></div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:users-bounces@shibboleth.net" target="_blank">users-bounces@shibboleth.net</a> [mailto:<a href="mailto:users-bounces@shibboleth.net" target="_blank">users-bounces@shibboleth.net</a>] <b>On Behalf Of </b>Karla Borecky<br>
<b>Sent:</b> Tuesday, April 17, 2012 11:57 AM</span></p><div><div class="h5"><br><b>To:</b> Shib Users<br><b>Subject:</b> Re: any advice on how to modify the login.jsp page?<u></u><u></u></div></div><p></p></div><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-bottom:12.0pt">I think the code that processes this decision needs to be on the Moodle side. I believe you can set up a chaining authentication in moodle... or maybe just a button for &#39;local authentication&#39;?<u></u><u></u></p>
<div><p class="MsoNormal">On Tue, Apr 17, 2012 at 1:18 PM, Wang, Holly &lt;<a href="mailto:holly.wang@csun.edu" target="_blank">holly.wang@csun.edu</a>&gt; wrote:<u></u><u></u></p><div><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">We have three kind of users, regular user log in through shibboleth, and moodle admin/guest will be just direct to moodle website for them to log in. </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">I am thinking weather the login page can see which website the user is logged in, then display different form based on the source. Do you think following code will work?</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">StorageService storageService = HttpServletHelper.getStorageService(application);</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">LoginContext loginContext = HttpServletHelper.getLoginContext(storageService,application, request);</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">String entityId = loginContext.getRelyingPartyId();</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">if (loginContext.getRelyingPartyId().equals(&quot;<a href="http://moodle.net" target="_blank">http://moodle.net</a>&quot;)){</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">then display a different html form here</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">else{</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">the default html login form here</span><u></u><u></u></p>
<div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">                                                                </span><u></u><u></u></p><p class="MsoNormal">
<span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Holly Wang, IT Department  CSUN, <a href="tel:818-677-2031" target="_blank">818-677-2031</a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"> </span><u></u><u></u></p></div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:users-bounces@shibboleth.net" target="_blank">users-bounces@shibboleth.net</a> [mailto:<a href="mailto:users-bounces@shibboleth.net" target="_blank">users-bounces@shibboleth.net</a>] <b>On Behalf Of </b>Karla Borecky<br>
<b>Sent:</b> Tuesday, April 17, 2012 10:14 AM<br><b>To:</b> Shib Users<br><b>Subject:</b> Re: any advice on how to modify the login.jsp page?</span><u></u><u></u></p></div><div><div><p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Holly, could you possibly branch the behavior based on an attribute (after the authentication)? or is this something that has to happen to actually process the login in different ways?<u></u><u></u></p>
<div><p class="MsoNormal">On Mon, Apr 16, 2012 at 4:31 PM, Wang, Holly &lt;<a href="mailto:holly.wang@csun.edu" target="_blank">holly.wang@csun.edu</a>&gt; wrote:<u></u><u></u></p><p class="MsoNormal">Hi,<br><br>I am asked to modify shib login.jsp page so the form with take multiple submit command. Depending on the submit button value, we send the form to different places.<br>
<br>I did some testing, tried to add a new jsp page to handle it. But I can&#39;t find a place to define the servlet definition for the new jsp page.<br><br>Does anyone has an example on the login.jsp which takes multiple submit commend?<br>
<br>Current login.jsp form:<br><br>&lt;form action=&quot;j_security_check&quot; method=&quot;post&quot; autocomplete=&quot;off&quot;&gt;<br>&lt;input type=&quot;text&quot; id=&quot;uid&quot; name=&quot;j_username&quot; style=&quot;width:100px&quot; value=&quot;&quot;/&gt;<br>
&lt;input type=&quot;password&quot; name=&quot;j_password&quot; style=&quot;width:100px&quot;/&gt;<br>&lt;input type=&quot;submit&quot; value=&quot;Login&quot; /&gt;<br>&lt;/form&gt;<br><br><br>We want it to be like following, but action lead to different places per the submit value:<br>
<br>&lt;form action=&quot; &quot;  method=&quot;post&quot; autocomplete=&quot;off&quot;&gt;<br>&lt;input type=&quot;text&quot; id=&quot;uid&quot; name=&quot;j_username&quot; style=&quot;width:100px&quot; value=&quot;&quot;/&gt;<br>
&lt;input type=&quot;password&quot; name=&quot;j_password&quot; style=&quot;width:100px&quot;/&gt;<br>&lt;input type=&quot;submit&quot; value=&quot;Login&quot; /&gt;<br>&lt;input value=&quot;moodleadmin&quot; type=&quot;submit&quot; name=&quot;moodleadmin&quot; id=&quot;moodleadmin&quot;&gt;<br>
&lt;/form&gt;<br><br>thanks<br><br>Holly Wang, IT Department  CSUN, <a href="tel:818-677-2031" target="_blank">818-677-2031</a><br><br>--<br>To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net" target="_blank">users-unsubscribe@shibboleth.net</a><u></u><u></u></p>
</div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div style="margin-left:30.0pt"><p class="MsoNormal">Karla Borecky<br>
Systems Administrator<br>ITS<br>Smith College<br>Northampton, MA 01063<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p></div></div></div></div><p class="MsoNormal"><br>--<br>To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net" target="_blank">users-unsubscribe@shibboleth.net</a><u></u><u></u></p>
</div><p class="MsoNormal"><br><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div style="margin-left:30.0pt"><p class="MsoNormal">Karla Borecky<br>
Systems Administrator<br>ITS<br>Smith College<br>Northampton, MA 01063<u></u><u></u></p></div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div><br>--<br>
To unsubscribe from this list send an email to <a href="mailto:users-unsubscribe@shibboleth.net">users-unsubscribe@shibboleth.net</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div style="margin-left:40px">
Karla Borecky<br>Systems Administrator<br>ITS<br>Smith College<br>Northampton, MA 01063<br></div><br>