summaryrefslogtreecommitdiff
path: root/addons/auth_oauth/controllers
diff options
context:
space:
mode:
authorLeonardo Rochael Almeida <leorochael@gmail.com>2015-06-03 05:47:45 +0200
committerMartin Trigaux <mat@odoo.com>2015-09-28 10:53:32 +0200
commit60af7cac02fc7e74510fc988367832b631d00196 (patch)
treec48eeda45375885431098e213f490f6080aa7fcb /addons/auth_oauth/controllers
parent06b3026bcdf483aff12f1daa8b6d26d9801ace61 (diff)
[IMP] replace simplejson with stdlib json
The stdlib version of the json library is more recent than the 3.5.3 version we are pinning in `requirements.txt` There is no reason to use it. Closes #6940
Diffstat (limited to 'addons/auth_oauth/controllers')
-rw-r--r--addons/auth_oauth/controllers/main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/auth_oauth/controllers/main.py b/addons/auth_oauth/controllers/main.py
index 683a2f87b48..f8adba4c0a2 100644
--- a/addons/auth_oauth/controllers/main.py
+++ b/addons/auth_oauth/controllers/main.py
@@ -1,7 +1,7 @@
import functools
import logging
-import simplejson
+import json
import urlparse
import werkzeug.utils
from werkzeug.exceptions import BadRequest
@@ -62,7 +62,7 @@ class OAuthLogin(Home):
client_id=provider['client_id'],
redirect_uri=return_url,
scope=provider['scope'],
- state=simplejson.dumps(state),
+ state=json.dumps(state),
)
provider['auth_link'] = provider['auth_endpoint'] + '?' + werkzeug.url_encode(params)
@@ -132,7 +132,7 @@ class OAuthController(http.Controller):
@http.route('/auth_oauth/signin', type='http', auth='none')
@fragment_to_query_string
def signin(self, **kw):
- state = simplejson.loads(kw['state'])
+ state = json.loads(kw['state'])
dbname = state['d']
provider = state['p']
context = state.get('c', {})
@@ -195,5 +195,5 @@ class OAuthController(http.Controller):
'c': {'no_user_creation': True},
}
- kw['state'] = simplejson.dumps(state)
+ kw['state'] = json.dumps(state)
return self.signin(**kw)