[Using Sakai] Basic LTI provider problem

Stephen P Vickers stephen at spvsoftwareproducts.com
Mon Dec 17 16:06:57 PST 2012


Is it possible that the problem is not with the LTI launch but that your 
browser is not accepting the third-party cookie for the login session 
which has been created?  Check the security settings in your browser or 
try a different browser.

Stephen

On 17/12/2012 23:47, Gordon Newcomb wrote:
> If i make a request to
> http://learn.dev:8080/imsblti/provider/sakai.schedule
> <http://learn.dev:8080/imsblti/provider/sakai.schedule&basiclti_submit=sometext&context_id=mercury&context_label=mercury> 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
> <mailto: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  <http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.4/javax/servlet/ServletResponse.java#ServletResponse.setContentType%28java.lang.String%29>("text/html");
>
> response.setStatus  <http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.4/javax/servlet/http/HttpServletResponse.java#HttpServletResponse.setStatus%28int%29>(HttpServletResponse  <http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.4/javax/servlet/http/HttpServletResponse.java#HttpServletResponse.0SC_FOUND>.SC_FOUND  <http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.4/javax/servlet/http/HttpServletResponse.java#HttpServletResponse.0SC_FOUND>);
>
> response.sendRedirect  <http://grepcode.com/file/repo1.maven.org/maven2/javax.servlet/servlet-api/2.4/javax/servlet/http/HttpServletResponse.java#HttpServletResponse.sendRedirect%28java.lang.String%29>(url.toString  <http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/StringBuilder.java#StringBuilder.toString%28%29>());
>
>
>
>
> 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 <mailto: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
>     <http://learn.dev:8080/imsblti/provider/sakai.schedule&basiclti_submit=sometext&context_id=mercury&context_label=mercury>
>
>     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
>     <mailto: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
>>     <mailto: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 <mailto: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 <mailto: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
>>>         <http://learn.dev:8080/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
>>>         <mailto: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
>>>             <mailto:gordonknewcomb at gmail.com>> wrote:
>>>
>>>                 http://learn.dev:8080/portal/tool-reset/mercury-210?panel=Main
>>>
>>>
>>>
>>>
>>
>
>
>
>
> _______________________________________________
> sakai-user mailing list
> sakai-user at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-user
>
> TO UNSUBSCRIBE: send email to sakai-user-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
>


More information about the sakai-user mailing list