diff --git a/rowers/templates/developers.html b/rowers/templates/developers.html index f383230a..e2907195 100644 --- a/rowers/templates/developers.html +++ b/rowers/templates/developers.html @@ -118,13 +118,22 @@

Standard Oauth2 authentication. Get authorization code by pointing your user to the authorization URL. - Exchange authorization code for an access token. When access token expires, + Exchange authorization code for an access token. When access token + expires, use the refresh token to refresh it.

+

The POST call must have content-type: x-www-form-urlencoded. + I set it this way to support the handy testing utility mentioned + belower. However, + I really would like to support application/json but with the + current framework I cannot support both at the same time. Expect + changes. Write to me if you want to be notified of changes.

+
API documentation
diff --git a/rowsandall_app/settings.py b/rowsandall_app/settings.py index c7af4887..58078fa3 100644 --- a/rowsandall_app/settings.py +++ b/rowsandall_app/settings.py @@ -262,7 +262,7 @@ GMAPIKEY = "AIzaSyAgu1w9QSthaGPMLp8y9JedPoMc9sfEgJ8" OAUTH2_PROVIDER = { # this is the list of available scopes 'SCOPES': {'read': 'Read scope', 'write': 'Write scope', 'groups': 'Access to your groups'}, - 'OAUTH2_BACKEND_CLASS': 'oauth2_provider.oauth2_backends.JSONOAuthLibCore' + # 'OAUTH2_BACKEND_CLASS': 'oauth2_provider.oauth2_backends.JSONOAuthLibCore' } diff --git a/rowsandall_app/urls.py b/rowsandall_app/urls.py index 6db8318d..3415cd36 100644 --- a/rowsandall_app/urls.py +++ b/rowsandall_app/urls.py @@ -27,15 +27,9 @@ from rowers import views as rowersviews urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), -# url('^', include('django.contrib.auth.urls')), url(r'^$',rootview), url(r'^version/$',version), -# url(r'^rowingdata/$',rowingdata,{'formloc':'/rowingdata/'}), -# url(r'^nrowingdata/$',nrowingdata,{'formloc':'/nrowingdata/'}), -# url(r'^upload/$',uploadfile,{'formloc':'/upload/'}), url(r'^addresult/(.+.*)/$',wait), -# url(r'^waitforplot/(.+.*)/$',waitforplot), -# url(r'^showplot/(.+.*)/$',showplot), url(r'^login/',auth_views.login, name='login'), url(r'^logout/',auth_views.logout_then_login,name='logout'), url(r'^password_change_done/$',auth_views.password_change_done,name='password_change_done'),