Re: Canvas OAuth2 From Django View

2015-06-29 Thread Henry Versemann
First let me say that I'm probably making this harder than it needs to be, but I must be missing something in this process. I'm trying to use the oauth2 process in the Canvas API, and I started working on this back in January, had other priorities that pulled me away from it, so I'm only now

Re: Canvas OAuth2 From Django View

2015-01-21 Thread Collin Anderson
Hi Henry, You need to send some kind of response back to the browser and the user. Maybe a message? or a maybe redirect to another page? def final_step(request): code = request.GET['code'] r = requests.post('https:///login/oauth2/token', { 'code': code, 'client_id': 'etc'} access_cod

Re: Canvas OAuth2 From Django View

2015-01-18 Thread Henry Versemann
Sergiy, Yes it is. Thanks. Henry On Saturday, January 17, 2015 at 10:36:06 AM UTC-6, Sergiy Khohlov wrote: > > Is CRFS protection enabled ? > 15 січ. 2015 18:51, користувач "Henry Versemann" > написав: > >> First let me say that I haven't done a lot of stuff with either Python or >> Django, but

Re: Canvas OAuth2 From Django View

2015-01-18 Thread Henry Versemann
Collin, thanks for the help. My django application as it is already has the "requests" library installed within it and I have already registered it with the API which I'm trying to authenticate to currently using that API's oauth2 web application flow, which is a three step process (see the oaut

Re: Canvas OAuth2 From Django View

2015-01-17 Thread Sergiy Khohlov
Is CRFS protection enabled ? 15 січ. 2015 18:51, користувач "Henry Versemann" написав: > First let me say that I haven't done a lot of stuff with either Python or > Django, but I think I understand most of the basics. > I am trying to get an access token back from the OAuth2 Web Application > Flo

Re: Canvas OAuth2 From Django View

2015-01-17 Thread Collin Anderson
Hi, Use urllib/urllib2 or requests to POST to other websites. Python can do it natively. try: # Python 3 from urllib import request as urllib_request except ImportError: # Python 2 import urllib2 as urllib_request from django.utils.http import urlencode def my_view(request): respo

Canvas OAuth2 From Django View

2015-01-15 Thread Henry Versemann
First let me say that I haven't done a lot of stuff with either Python or Django, but I think I understand most of the basics. I am trying to get an access token back from the OAuth2 Web Application Flow of the Canvas' LMS API ( https://canvas.instructure.com/doc/api/file.oauth.html ). I have