<div dir="ltr"><div><div><div><div>Hi,<br><br></div>I just found:<br><br><span style="font-family:courier new,monospace">public function needsLogin ()<br>{<br>   return false;<br>}</span><br><br></div>Marvellous.  Getting there now.  Thanks guys.<br>
<br></div>Cheers,<br><br></div>Bruce<br><br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 23 July 2013 09:46, Smith, John <span dir="ltr"><<a href="mailto:J.J.Smith@gcu.ac.uk" target="_blank">J.J.Smith@gcu.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">All shib.php (and the 3 functions i listed) does is return an array of firstname, surname and username and true if valid... You can just return that and do no auth whatsoever and accusers will have same details... I believe guest works similar to this...<br>

<br>
So what you need to do is print_r the shib session details once logged in (just to find out what is passed and transfer those details to the array...<br>
<br>
However if you change the cookie then shib may log you out so that may not work with the kind of overall Shib auth you have on all server traffic...<br>
<br>
You'll just need to try and see what happens...<br>
<br>
Regards<br>
<br>
John Smith<br>
Learning Technologist<br>
School of Health and Life Sciences<br>
<br>
Sent from Samsung Galaxy SII<br>
<div class="im"><br>
<br>
<br>
Bruce Jackson <<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a>> wrote:<br>
<br>
<br>
Hi again,<br>
<br>
I've got a Shibboleth SP set up on the server to 'protect' the whole website.<br>
That's working OK, in that if a user goes to the site they get redirected to the IdP, get identified, and then control is passed back to the xerte server along with certain user credentials.<br>
At that point I want to be able to use those credentials to log the user in.<br>
I've had a go at what John suggested - creating a new 'Shib.php' script in the .../Library/Xerte/Authentication folder and changing auth_config.php to point at it.  However that just puts me at the standard xerte login screen on return from the IdP authentication.  It doesn't throw any errors and logs me in correctly if I fill in the details again, so I guess I've not made any errors in the Shib.php script.  It's just not really doing what I'm after.<br>

Is there a way of achieving what I want?<br>
<br>
Cheers,<br>
<br>
Bruce<br>
<br>
<br>
<br>
</div><div class="im">On 22 July 2013 15:33, Pat @ Pgogy <<a href="mailto:xerte@pgogywebstuff.com">xerte@pgogywebstuff.com</a><mailto:<a href="mailto:xerte@pgogywebstuff.com">xerte@pgogywebstuff.com</a>>> wrote:<br>

Integration.txt is more of a single sign on botch job<br>
<br>
What John describes makes more sense<br>
<br>
I would grab a php shibboleth library and then use a cut up ldap php to call out to the library<br>
<br>
Pat<br>
<br>
</div><div class="im">On 22 Jul 2013, at 11:01, "Smith, John" <<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a><mailto:<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a>>> wrote:<br>

<br>
> Hi,<br>
><br>
> I think for now you could duplicate the ldap auth file and rewrite:<br>
><br>
> check()<br>
> _valid_login()<br>
> _validate_to_host()<br>
><br>
> You'll need to hardwire some of the values as LDAP auth is hooked into the XOT database (we're working on changing the way this is done so that you should be able to store your Shib config values in XOT db more easily soon!ish)...<br>

><br>
> As long as you return true and populate<br>
><br>
> $this->_record = array('firstname' => xxxx], 'surname' => xxxx, 'username' => xxxx);<br>
><br>
> then I believe that this should work... config.php will take care of the rest, including session_start()<br>
><br>
> Regards,<br>
><br>
> John Smith | Learning Technologist<br>
> Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University<br>
> Cowcaddens Road | Glasgow | G4 0BA<br>
> ________________________________________<br>
</div><div class="im">> From: <a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>> [<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>>] On Behalf Of Bruce Jackson [<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a><mailto:<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a>>]<br>

</div><div class="im">> Sent: 22 July 2013 10:45<br>
> To: Xerte discussion list<br>
> Subject: [Xerte] Re: Shibbolising XOT<br>
><br>
> Hi John,<br>
><br>
> That was the route I was initially attempting, but ended confused as to what I should or shouldn't have included in my 'Shib.php' script.<br>
> Could I hack the 'Ldap.php' script for example, just leaving in the public functions getUsername, getFirstname and getSurname to return the values passed forward from the Shibboleth IdP?<br>
><br>
> Cheers,<br>
><br>
> Bruce<br>
><br>
><br>
><br>
</div><div class="im">> On 22 July 2013 10:20, Smith, John <<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a><mailto:<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a>><mailto:<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a><mailto:<a href="mailto:J.J.Smith@gcu.ac.uk">J.J.Smith@gcu.ac.uk</a>>>> wrote:<br>

> I'd advise NOT altering the core files (you will then run into upgrade probs in the future for one) but looking in \library\Xerte\Authentication and creating a new Shibboleth authentication class that is abstracted out and should then be able to just slot in...<br>

><br>
> Then it should only be a case of adding a new authentication method to auth_config<br>
><br>
> Regards,<br>
><br>
> John Smith | Learning Technologist<br>
> Room A251, Govan Mbeki Building | School of Health & Life Sciences | Glasgow Caledonian University<br>
> Cowcaddens Road | Glasgow | G4 0BA<br>
> ________________________________________<br>
</div>> From: <a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>>> [<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte-bounces@lists.nottingham.ac.uk">xerte-bounces@lists.nottingham.ac.uk</a>>>] On Behalf Of Bruce Jackson [<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a><mailto:<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a>><mailto:<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a><mailto:<a href="mailto:bj1@soas.ac.uk">bj1@soas.ac.uk</a>>>]<br>

<div class="im">> Sent: 22 July 2013 10:04<br>
</div>> To: <a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a>><mailto:<a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a>>><br>

<div><div class="h5">> Subject: [Xerte] Shibbolising XOT<br>
><br>
> Hello,<br>
><br>
> We're trying to get Shibboleth working as a method of authentication here.<br>
><br>
> From a thread on this forum back in November 2010 (<a href="http://lists.nottingham.ac.uk/pipermail/xerte/2010-November/007360.html" target="_blank">http://lists.nottingham.ac.uk/pipermail/xerte/2010-November/007360.html</a>), and from reading the comments in the integration.txt file, it appears it should be a fairly simple case of editing integration.txt to set the three variables ($_SESSION['toolkits_firstname'], $_SESSION['toolkits_surname'] and $_SESSION['toolkits_logon_username']) to values obtained from the Shibboleth IdP, adding a call "session_start()" at the beginning of the script, and then renaming integration.txt to be index.php.<br>

><br>
> When I do that and try to log in, the page I get back appears to have a chunk of html missing at the start - see below.<br>
> Should I be copying parts of the standard index.php script into the integration.txt version?<br>
><br>
> Returned html:<br>
><br>
> +++<br>
><br>
><br>
> <script type="text/javascript"> // JAVASCRIPT library for fixed variables<br>
> // management of javascript is set up here<br>
> // SITE SETTINGS<br>
> var site_url = "<a href="http://lamp1.lis.soas.ac.uk/xerte/" target="_blank">http://lamp1.lis.soas.ac.uk/xerte/</a>";<br>
> var site_apache = "false";<br>
> var properties_ajax_php_path = "website_code/php/properties/";<br>
> var management_ajax_php_path = "website_code/php/management/";<br>
> var ajax_php_path = "website_code/php/";<br>
> <div class="folder" id="folder_workspace" ondblclick="folder_open_close(this)" onclick="highlight_main_toggle(this)"><p><img style="vertical-align:middle" src="<a href="http://lamp1.lis.soas.ac.uk/xerte//website_code/images/folder_workspace.gif" target="_blank">http://lamp1.lis.soas.ac.uk/xerte//website_code/images/folder_workspace.gif</a>" />Workspace</p></div><div id="folderchild_workspace" class="workspace"><div id="file_5" class="file" preview_size="800,665" editor_size="800,665" style="padding-left:20px" onmousedown="single_click(this);file_folder_click_pause(event)" onmouseup="file_drag_stop(event,this)"><img src="<a href="http://lamp1.lis.soas.ac.uk/xerte//website_code/images/Icon_Page.gif" target="_blank">http://lamp1.lis.soas.ac.uk/xerte//website_code/images/Icon_Page.gif</a>" style="vertical-align:middle" />BJProj</div><div id="file_6" class="file" preview_size="800,665" editor_size="800,665" style="padding-left:20px" onmousedown="single_click(this);file_folder_click_pause(event)" onmouseup="file_drag_stop(event,this)"><img src="<a href="http://lamp1.lis.soas.ac.uk/xerte//website_code/images/Icon_Page.gif" target="_blank">http://lamp1.lis.soas.ac.uk/xerte//website_code/images/Icon_Page.gif</a>" style="vertical-align:middle" />BJProj</div></div><div class="folder" id="recyclebin" ondblclick="folder_open_close(this)" onclick="highlight_main_toggle(this)"><p><img id="folder_recyclebin" style="vertical-align:middle" src="<a href="http://lamp1.lis.soas.ac.uk/xerte//website_code/images/rb_empty.gif" target="_blank">http://lamp1.lis.soas.ac.uk/xerte//website_code/images/rb_empty.gif</a>" />Recycle Bin</p></div><div id="folderchild_recyclebin" class="folder_content"></div><div class="template" onmouseover="this.style.backgroundColor='#ebedf3'" onmouseout="this.style.backgroundColor='#fff'"><div class="template_icon"></div><div class="template_desc"><p class="template_name">Bootstrap Template</p><p class="template_desc_p">A responsive template for delivering content to all devices.<br><button type="button" class="xerte_button" onclick="javascript:template_toggle('site')">Create</button></div><div id="site" class="rename"><span>Enter a name for this project</span><form action="javascript:create_tutorial('site')" method="post" enctype="text/plain"><input type="text" width="200" id="filename" name="filename" /><br /><button type="submit" class="xerte_button" >Create Project</button></form></div></div><div class="template" onmouseover="this.style.backgroundColor='#ebedf3'" onmouseout="this.style.backgroundColor='#fff'"><div class="template_icon"></div><div class="template_desc"><p class="template_name">Xerte Online Toolkit</p><p class="template_desc_p">A flexible template for creating interactive learning objects.<br><button type="button" class="xerte_button" onclick="javascript:template_toggle('Nottingham')">Create</button></div><div id="Nottingham" class="rename"><span>Enter a name for this project</span><form action="javascript:create_tutorial('Nottingham')" method="post" enctype="text/plain"><input type="text" width="200" id="filename" name="filename" /><br /><button type="submit" class="xerte_button" >Create Project</button></form></div></div><div class="template" onmouseover="this.style.backgroundColor='#ebedf3'" onmouseout="this.style.backgroundColor='#fff'"><div class="template_icon"></div><div class="template_desc"><p class="template_name">RSS Feed</p><p class="template_desc_p">Easily create and maintain an RSS Feed.<br><button type="button" class="xerte_button" onclick="javascript:template_toggle('Rss')">Create</button></div><div id="Rss" class="rename"><span>Enter a name for this project</span><form action="javascript:create_tutorial('Rss')" method="post" enctype="text/plain"><input type="text" width="200" id="filename" name="filename" /><br /><button type="submit" class="xerte_button" >Create Project</button></form></div></div><br>

> </body><br>
> </html><br>
><br>
><br>
> +++<br>
><br>
> Thanks in advance for any help.<br>
><br>
> Cheers,<br>
><br>
> Bruce<br>
><br>
> Glasgow Caledonian University is a registered Scottish charity, number SC021474<br>
><br>
> Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.<br>
> <a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html</a><br>
><br>
> Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.<br>
> <a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html</a><br>
> _______________________________________________<br>
> Xerte mailing list<br>
</div></div>> <a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>><mailto:<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>>><br>

<div class="im">> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
><br>
> Glasgow Caledonian University is a registered Scottish charity, number SC021474<br>
><br>
> Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.<br>
> <a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html</a><br>
><br>
> Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.<br>
> <a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html</a><br>
><br>
> _______________________________________________<br>
> Xerte mailing list<br>
</div>> <a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>><br>
<div class="HOEnZb"><div class="h5">> <a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
> This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.<br>

><br>
> This message has been checked for viruses but the contents of an attachment<br>
> may still contain software viruses which could damage your computer system, you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.<br>

><br>
><br>
><br>
><br>
<br>
_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><mailto:<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a>><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
<br>
<br>
Glasgow Caledonian University is a registered Scottish charity, number SC021474<br>
<br>
Winner: Times Higher Education’s Widening Participation Initiative of the Year 2009 and Herald Society’s Education Initiative of the Year 2009.<br>
<a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html</a><br>
<br>
Winner: Times Higher Education’s Outstanding Support for Early Career Researchers of the Year 2010, GCU as a lead with Universities Scotland partners.<br>
<a href="http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html" target="_blank">http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,15691,en.html</a><br>
_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte" target="_blank">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><br>
</div></div></blockquote></div><br></div>