summaryrefslogtreecommitdiff
path: root/service/pixelated/config/authentication.py
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2016-09-23 15:28:59 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2016-09-23 15:38:47 -0300
commit62e7904d8791a600474ca6491db75eb9102a1093 (patch)
tree180235903c9c0d195083f89fb740f641218a7319 /service/pixelated/config/authentication.py
parente2cb0deda1e0668dd23e0fefc8020d10c1cad488 (diff)
Replace SRPSession usages with bonafide
In order to replace leap_auth with bonafide, we created a class to hold the user credentials
Diffstat (limited to 'service/pixelated/config/authentication.py')
-rw-r--r--service/pixelated/config/authentication.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/service/pixelated/config/authentication.py b/service/pixelated/config/authentication.py
new file mode 100644
index 00000000..dc8439cc
--- /dev/null
+++ b/service/pixelated/config/authentication.py
@@ -0,0 +1,11 @@
+class Authentication(object):
+
+ def __init__(self, username, token, uuid, session_id, user_attributes):
+ self.username = username
+ self.token = token
+ self.uuid = uuid
+ self.session_id = session_id
+ self._user_attributes = user_attributes
+
+ def is_admin(self):
+ return self._user_attributes.get('is_admin', False)