projects
/
osm
/
LW-UI.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into v7.0
[osm/LW-UI.git]
/
authosm
/
backend.py
diff --git
a/authosm/backend.py
b/authosm/backend.py
index
9c316a9
..
f71eddd
100644
(file)
--- a/
authosm/backend.py
+++ b/
authosm/backend.py
@@
-21,6
+21,7
@@
from .exceptions import OSMAuthException
class OsmBackend(object):
class OsmBackend(object):
+
def authenticate(self, **kwargs):
'''
kwargs will receive the python dict that may contain
def authenticate(self, **kwargs):
'''
kwargs will receive the python dict that may contain
@@
-42,6
+43,7
@@
class OsmBackend(object):
user.psw = password
user.token = result['data']['id']
user.project_id = result['data']['project_id']
user.psw = password
user.token = result['data']['id']
user.project_id = result['data']['project_id']
+ user.project_name = result['data']['project_name']
user.token_expires = result['data']['expires']
user.is_admin = bool(result['data']['admin'])
user.save()
user.token_expires = result['data']['expires']
user.is_admin = bool(result['data']['admin'])
user.save()
@@
-60,3
+62,4
@@
class OsmBackend(object):
return OsmUser.objects.get(pk=user_id)
except OsmUser.DoesNotExist:
return None
return OsmUser.objects.get(pk=user_id)
except OsmUser.DoesNotExist:
return None
+