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;?<br><br><div class="gmail_quote">
On Tue, Apr 17, 2012 at 1:18 PM, Wang, Holly <span dir="ltr">&lt;<a href="mailto:holly.wang@csun.edu" target="_blank">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">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. <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 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?<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">StorageService storageService = HttpServletHelper.getStorageService(application);<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">LoginContext loginContext = HttpServletHelper.getLoginContext(storageService,application, request);<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">String entityId = 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">if (loginContext.getRelyingPartyId().equals(&quot;<a href="http://moodle.net" target="_blank">http://moodle.net</a>&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"><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 a different html form here<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">else{<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">the default html login form here<u></u><u></u></span></p>

<div><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: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 10:14 AM<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></span></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><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><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>