summaryrefslogtreecommitdiff
path: root/addons/auth_oauth
diff options
context:
space:
mode:
authorToufik Benjaa <tbe@odoo.com>2018-03-20 16:36:26 +0100
committerToufik Benjaa <tbe@odoo.com>2018-06-27 16:39:45 +0200
commit29c00a56daa377e40f4d28e86a10f105617fd243 (patch)
tree6c89ee53a4e1729a754b4df96bb6d60fd89cb5e8 /addons/auth_oauth
parentc1b6cfaab8d42885533e23985058cfc78b48d7c7 (diff)
[IMP] http: Sessions implicit deactivation
- Store a token inside sessions to allow implicit session deactivation when needed. backport of @da1f153d61d747d9357694382fe04f96c0ca886a @c8243e71c6da37547a19f61c58f25d5d03e13d38
Diffstat (limited to 'addons/auth_oauth')
-rw-r--r--addons/auth_oauth/res_users.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/auth_oauth/res_users.py b/addons/auth_oauth/res_users.py
index 60fdd7319a1..f89234a743e 100644
--- a/addons/auth_oauth/res_users.py
+++ b/addons/auth_oauth/res_users.py
@@ -6,6 +6,7 @@ import urllib2
import json
import openerp
+from openerp import api
from openerp.addons.auth_signup.res_users import SignupError
from openerp.osv import osv, fields
from openerp import SUPERUSER_ID
@@ -125,4 +126,8 @@ class res_users(osv.Model):
if not res:
raise
+ @api.model
+ def _get_session_token_fields(self):
+ return super(res_users, self)._get_session_token_fields() | {'oauth_access_token'}
+
#