add oauth flow for github and gitlab

This commit is contained in:
Laura Klünder 2016-09-29 16:33:45 +02:00
parent 7deb001f08
commit 3707469eed
14 changed files with 359 additions and 22 deletions

13
src/c3nav/editor/tasks.py Normal file
View file

@ -0,0 +1,13 @@
from c3nav.celery import app
@app.task()
def request_access_token(hoster, *args, **kwargs):
from c3nav.editor.hosters import hosters
return hosters[hoster].do_request_access_token(*args, **kwargs)
@app.task()
def check_access_token(hoster, access_token):
from c3nav.editor.hosters import hosters
return hosters[hoster].do_check_access_token(access_token)