[Building Sakai] authentication for consuming rest apis.

Schauer, Christopher R cschauer at txstate.edu
Wed Feb 25 10:59:21 PST 2015


You can also get a session by posting to /direct/session?_username=user&_password=pw. This also sends back a session cookie, but it would eliminate the need for website scraping.

-Chris

On Feb 25, 2015, at 7:40 AM, William Karavites <willkara at oit.rutgers.edu<mailto:willkara at oit.rutgers.edu>>
 wrote:

It also currently only supports Python2.7> since the egg it library it depends on for the website scraping/cookie logging (Mechanize) isn't Python3 supported yet.

If anyone has a Python3 supported library please let me know.


-Will

------------------------------------
William Karavites
Application Programmer
OIT/OIRT- Rutgers University
Office: 848-445-8726
Cell: 732-822-9405
willkara at rutgers.edu<mailto:willkara at rutgers.edu>
http://willkara.com
------------------------------------

________________________________
From: "William Karavites" <willkara at oit.rutgers.edu<mailto:willkara at oit.rutgers.edu>>
To: "Neal Caidin" <neal.caidin at apereo.org<mailto:neal.caidin at apereo.org>>
Cc: "Anup" <anup.dhabarde at gmail.com<mailto:anup.dhabarde at gmail.com>>, "Sakai-Dev" <sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>>
Sent: Wednesday, February 25, 2015 8:38:39 AM
Subject: Re: [Building Sakai] authentication for consuming rest apis.

Anup,


I'm the creator of SakaiPy and would love to assist you in using it if you need any help. I haven't had much time lately to go more into its development but it is stable at this point.

The way it works is that you enter in a URL that contains the login form for your Sakai Installation. After you enter the password/username fields and values, it passes back a cookie to you which allows you to access the /direct API.

It's currently limited to only a few tools but once I have time, I'm planning to extend it to more and also give it a 'blank space'(not the Taylor Swift song) functionality, so that you can put in your own /direct links.

Please feel free to message or call me if you have any questions.


-Will

------------------------------------
William Karavites
Application Programmer
OIT/OIRT- Rutgers University
Office: 848-445-8726
Cell: 732-822-9405
willkara at rutgers.edu<mailto:willkara at rutgers.edu>
http://willkara.com
------------------------------------

________________________________
From: "Neal Caidin" <neal.caidin at apereo.org<mailto:neal.caidin at apereo.org>>
To: "Anup" <anup.dhabarde at gmail.com<mailto:anup.dhabarde at gmail.com>>
Cc: "Sakai-Dev" <sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>>
Sent: Wednesday, February 25, 2015 8:16:08 AM
Subject: Re: [Building Sakai] authentication for consuming rest apis.

Hi Anup,

Check this out!

http://willkara.com/sakaipy-the-sakai-python-restful-interface/<https://urldefense.proofpoint.com/v2/url?u=http-3A__willkara.com_sakaipy-2Dthe-2Dsakai-2Dpython-2Drestful-2Dinterface_&d=AwMFaQ&c=OrYO-caJHQE1g_AJU3az1awi55It-bjDIQrtRiZ6WBk&r=2GtSValzWzuAeHPe1VTn34y7siqsP0COyo2UCa1yuDA&m=9JY5RL63057dTHBndhte9NZM4G0NFYIXKmBeJKGVCJ8&s=IU6mOJxQW8upbTjrYf_7XhbtM-KPtR-k3tyBwARgsRc&e=>

You could use the library directly and I also imagine it has good examples. It supports Python 2, last I heard, and not Python 3.


Cheers,
Neal


On Tue, Feb 24, 2015 at 4:36 PM, Anup <anup.dhabarde at gmail.com<mailto:anup.dhabarde at gmail.com>> wrote:
Hi,

I am currently working on an external application which will consume the rest
apis (/direct). I am having trouble figuring out how to do the authentication
for the same using oauth 1.0 in my python code?

If anyone has an example, that would be very helpful.

Thanks,
Anup

_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev<https://urldefense.proofpoint.com/v2/url?u=http-3A__collab.sakaiproject.org_mailman_listinfo_sakai-2Ddev&d=AwMFaQ&c=OrYO-caJHQE1g_AJU3az1awi55It-bjDIQrtRiZ6WBk&r=2GtSValzWzuAeHPe1VTn34y7siqsP0COyo2UCa1yuDA&m=9JY5RL63057dTHBndhte9NZM4G0NFYIXKmBeJKGVCJ8&s=29hlwvjMQieDns41VjEta_Vb-czvJb3CQOmMDxW6PXM&e=>

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org<mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a subject of "unsubscribe"


_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>
http://collab.sakaiproject.org/mailman/listinfo/sakai-dev

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"




_______________________________________________
sakai-dev mailing list
sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>
https://urldefense.proofpoint.com/v2/url?u=http-3A__collab.sakaiproject.org_mailman_listinfo_sakai-2Ddev&d=AwICAg&c=OrYO-caJHQE1g_AJU3az1awi55It-bjDIQrtRiZ6WBk&r=2GtSValzWzuAeHPe1VTn34y7siqsP0COyo2UCa1yuDA&m=9JY5RL63057dTHBndhte9NZM4G0NFYIXKmBeJKGVCJ8&s=29hlwvjMQieDns41VjEta_Vb-czvJb3CQOmMDxW6PXM&e=

TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20150225/ae2d4d93/attachment.html 


More information about the sakai-dev mailing list