[Using Sakai] Basic LTI provider problem

Steve Swinsburg steve.swinsburg at gmail.com
Mon Dec 17 16:02:51 PST 2012


The provider servlet does authenticate the user. It then performs a redirect to the requested tool so the idea is that it is rendered in an iframe.

What have you got in sakai.properties for the config?

Check out the sample code here:
http://ims-dev.googlecode.com/svn/trunk/basiclti/php-simple/index.php

If you are running a portal you can also use this portlet:
https://wiki.jasig.org/display/PLT/Basic+LTI+Portlet

As for version of software, you could probably run 1.3 of basic LTI in 2.7 (It needed to be patched in 2.6). I don't believe older versions are supported.

cheers,
Steve


On 18/12/2012, at 10:47 AM, Gordon Newcomb <gordonknewcomb at gmail.com> wrote:

> If i make a request to http://learn.dev:8080/imsblti/provider/sakai.schedule in the browser, I sart to get a lot of errors regarding the missing params. 
> 
> and yes, this is a POST request: http://learn.dev:8080/imsblti/provider/sakai.schedule&basiclti_submit=sometext&context_id=mercury&context_label=mercury_site&context_title=mercury site&ext_sakai_provider_eid=admin&lis_person_contact_email_primary=admin at gmail.com&lis_person_name_full=admin&lis_person_sourcedid=1&lti_message_type=basic-lti-launch-request&lti_version=LTI-1p0&oauth_callback=about:blank&oauth_consumer_key=testkey&oauth_nonce=16824c1f859a05380cf0fbfef7a41c58&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1355779980&oauth_version=1.0&resource_link_id=~&user_id=admin
> 
> 
> I was just passing this to show everyone on the list the parameters in the request, maybe I am missing a parameter, but I was chekcing against the Sakai source code and it seems that all the params are there. 
> 
> Sakai's org.sakaiproject.blti.ProviderServlet is returning the correct url: http://localhost:8080/portal/tool/mercury-210?panel=Main (the code in ProviderServlet is here: 
> response.setContentType("text/html");
> response.setStatus(HttpServletResponse.SC_FOUND);
> response.sendRedirect(url.toString());
> 
> 
> 
> It's just a POST request and the content is rendered on a page. Did anyone else have the same problem? What is your approach when building a Basic LTI consumer? 
> Do you output the content in an iframe and if the user is not authenticated in Sakai, then he sees the Sakai login-form? I was trying to avoid iframes and assumed that the ProviderServlet authenticates the user. 
> 
>  
> 
> 
> On Mon, Dec 17, 2012 at 5:21 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
> The URL you went to was a Sakai portal URL. I meant this URL:
> http://learn.dev:8080/imsblti/provider/sakai.schedule
> 
> What do you get?
> 
> Also, the request needs to be a POST. What are you using to make the request?
> 
> cheers,
> Steve
> 
> On 18/12/2012, at 8:35 AM, Gordon Newcomb <gordonknewcomb at gmail.com> wrote:
> 
>> Hi
>> I am using Sakai 2.7
>> If I enter the path (http://localhost:8080/portal/tool/mercury-210?panel=Main)  in the browser, it's the same, I am presented a login form, but I think it's ok in this case, as I am not logged-in. 
>> While using LTI I would expect to be logged in. 
>> This is the request that I make in order to retrieve the content:
>> 
>> http://learn.dev:8080/imsblti/provider/sakai.schedule&basiclti_submit=sometext&context_id=mercury&context_label=mercury site&context_title=mercury site&ext_sakai_provider_eid=admin&lis_person_contact_email_primary=admin at gmail.com&lis_person_name_full=admin&lis_person_sourcedid=1&lti_message_type=basic-lti-launch-request&lti_version=LTI-1p0&oauth_callback=about:blank&oauth_consumer_key=testkey&oauth_nonce=16824c1f859a05380cf0fbfef7a41c58&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1355779980&oauth_version=1.0&resource_link_id=~&user_id=admin 
>> 
>> 
>> On Mon, Dec 17, 2012 at 3:20 PM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>> The code will log you in automatically based on the eid you provide. What version Sakai are you using? What happens if you just go to the request URL in the browser? Any issues in the browser error console?
>> 
>> Cheers,
>> Steve
>> 
>> Sent from my iPad
>> 
>> On 18/12/2012, at 1:51, Gordon Newcomb <gordonknewcomb at gmail.com> wrote:
>> 
>>> Hi
>>> 
>>> The request is http://learn.dev:8080/imsblti/provider/sakai.schedule with all the params. 
>>> 
>>> /portal/tool-reset/mercury-210?panel=Main  is the response received from sakai. But it's a "302 Moved Temporarily" that redirects to the login page. 
>>> 
>>> Is there a way to be logged-in while consuming content from LTI? Judging by the sourcecode, it should work, maybe I am missing some configurations:
>>> 
>>> org.sakaiproject.blti.ProviderServlet
>>> 
>>> 			if(isTrustedConsumer) {
>>> 				UsageSessionService.login(user_id, eid, ipAddress, null,UsageSessionService.EVENT_LOGIN_WS);
>>> 				sess.setUserId(user_id);
>>> 				sess.setUserEid(eid);
>>> 			}
>>> 
>>> 
>>> On Mon, Dec 17, 2012 at 6:25 AM, Steve Swinsburg <steve.swinsburg at gmail.com> wrote:
>>> Hi Patrick,
>>> 
>>> Is the URL you are using for the request:
>>> http://learn.dev:8080/portal/tool-reset/mercury-210?panel=Main 
>>> 
>>> ?
>>> 
>>> It should be
>>> http://learn.dev:8080/imsblti/provider/TOOLID
>>> 
>>> cheers,
>>> Steve
>>> 
>>> 
>>> 
>>> On Mon, Dec 17, 2012 at 6:22 PM, Gordon Newcomb <gordonknewcomb at gmail.com> wrote:
>>> http://learn.dev:8080/portal/tool-reset/mercury-210?panel=Main 
>>> 
>>> 
>> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-user/attachments/20121218/57078238/attachment-0001.html 


More information about the sakai-user mailing list