changed API to accept forms not json encoding
This commit is contained in:
@@ -118,13 +118,22 @@
|
||||
|
||||
<p>Standard <a href="https://oauth.net/2/">Oauth2</a> 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.</p>
|
||||
|
||||
<p>The POST call must have content-type: <i>x-www-form-urlencoded</i>.
|
||||
I set it this way to support the handy testing utility mentioned
|
||||
belower. However,
|
||||
I really would like to support <i>application/json</i> 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.</p>
|
||||
|
||||
<ul>
|
||||
<li>Authorization URL: <b>https://rowsandall.com/rowers/o/authorize</b></li>
|
||||
<li>Access Token request: <b>https://rowsandall.com/rowers/o/token/</b></li>
|
||||
<li>Access Token refresh: <b>https://rowsandall.com/rowers/o/token/</b></li>
|
||||
<li>Handy utility for testing: <b><a href="http://django-oauth-toolkit.herokuapp.com/consumer/">http://django-oauth-toolkit.herokuapp.com/consumer/</a></b></li>
|
||||
</ul>
|
||||
|
||||
<h6>API documentation</h6>
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user